Class: Cloudkeeper::CLI
- Inherits:
-
Thor
- Object
- Thor
- Cloudkeeper::CLI
- Defined in:
- lib/cloudkeeper/cli.rb
Instance Method Summary collapse
Instance Method Details
#sync ⇒ Object
120 121 122 123 124 125 126 127 128 129 |
# File 'lib/cloudkeeper/cli.rb', line 120 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
132 133 134 |
# File 'lib/cloudkeeper/cli.rb', line 132 def version $stdout.puts Cloudkeeper::VERSION end |