6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/vagrant-node/nodeserverstop.rb', line 6
def execute
opts = OptionParser.new do |opts|
opts.banner = "Usage: vagrant nodeserver stop --passwd password"
opts.separator ""
end
argv = parse_options(opts)
return if !argv
raise Vagrant::Errors::CLIInvalidUsage, :help => opts.help.chomp if argv.length > 1
begin
ServerAPI::ServerManager.stop(@env.tmp_path,@env.data_dir)
rescue Exception => e
@env.ui.error(e.message)
end
0
end
|