Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case ARGV[0]
- when "start"
- start
- when "stop"
- stop
- when "status"
- status
- else
- puts "usage chef_client_daemon {start|stop|status}"
- end
- def start
- if File.exist?('/var/run/chef/client.pid')
- puts "#{NAME already running}"
- else
- puts "#{NAME} is starting"
- system('echo starting chef-client')
- if $?.exitstatus != 0
- puts "The command didn't start"
- end
- end
- end
- error "chef_client_daemon.rb:12:in `<main>': undefined local variable or method `start' for main:Object (NameError)"
Advertisement
Add Comment
Please, Sign In to add comment