bin/sys_watchdog in sys_watchdog-0.1.19 vs bin/sys_watchdog in sys_watchdog-0.1.20
- old
+ new
@@ -1,10 +1,10 @@
#!/usr/bin/env ruby
require 'sys_watchdog'
-def red(mytext) ; "\e[31m#{mytext}\e[0m" ; end
+def red mytext; "\e[31m#{mytext}\e[0m"; end
def help_msg
<<~HEREDOC
sys_watchdog v#{SysWatchdogVersion::VERSION.dup}
@@ -27,13 +27,10 @@
setup_commands = %w(setup start stop uninstall)
case ARGV[0]
-when *setup_commands
- Setup.new.send ARGV[0].to_sym
-
when 'test'
sw = SysWatchdog.new log_file: STDOUT
sw.run once: true
when 'once'
@@ -45,9 +42,12 @@
when 'version', '-v', '--version'
puts SysWatchdogVersion::VERSION.dup
when 'help', '-h'
puts help_msg
+
+when *setup_commands
+ Setup.new.send ARGV[0].to_sym
else
STDERR.puts red("Error: '#{ARGV[0]}' is not a valid option.")
puts ""
puts help_msg