diff options
-rwxr-xr-x | dist/debian-init-script | 4 | ||||
-rw-r--r-- | lib/nickserver/daemon.rb | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/dist/debian-init-script b/dist/debian-init-script index da54d12..af36aad 100755 --- a/dist/debian-init-script +++ b/dist/debian-init-script @@ -29,15 +29,19 @@ fi case "$1" in start) $DAEMON $OPTIONS start + exit $? ;; stop) $DAEMON $OPTIONS stop + exit $? ;; restart) $DAEMON $OPTIONS restart + exit $? ;; status) $DAEMON $OPTIONS status + exit $? ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|restart|status}" diff --git a/lib/nickserver/daemon.rb b/lib/nickserver/daemon.rb index a6066af..e0bd527 100644 --- a/lib/nickserver/daemon.rb +++ b/lib/nickserver/daemon.rb @@ -251,8 +251,10 @@ module Nickserver def command_status if daemon_running? puts "#{@name.capitalize} running, process id #{pid_from_file(Config.pid_file)}." + exit(0) else puts "No #{@name} processes are running." + exit(1) # must exit non-zero if not running end end |