Class: Cloudkeeper::CLI
- Inherits:
-
Thor
- Object
- Thor
- Cloudkeeper::CLI
- Defined in:
- lib/cloudkeeper/cli.rb
Instance Method Summary collapse
Instance Method Details
#sync ⇒ Object
108 109 110 111 112 113 114 115 116 117 |
# File 'lib/cloudkeeper/cli.rb', line 108 def sync initialize_sync File.open(Cloudkeeper::Settings[:'lock-file'], File::RDWR | File::CREAT, 0o644) do |file| lock = file.flock(File::LOCK_EX | File::LOCK_NB) Cloudkeeper::Managers::ApplianceManager.new.synchronize_appliances if lock abort 'cloudkeeper instance is already running, quitting' unless lock end rescue Cloudkeeper::Errors::InvalidConfigurationError => ex abort ex. end |
#version ⇒ Object
120 121 122 |
# File 'lib/cloudkeeper/cli.rb', line 120 def version $stdout.puts Cloudkeeper::VERSION end |