Browse Source

Enable reload in init script (Debian#548797)

Christoph Biedl 14 years ago
parent
commit
eb330e450d
1 changed files with 15 additions and 29 deletions
  1. 15 29
      debian/ngircd.init

+ 15 - 29
debian/ngircd.init

@@ -227,36 +227,22 @@ case "$1" in
             exit 1
         fi
         ;;
-  # Use this if the daemon cannot reload
   reload)
-        log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
-        log_warning_msg "cannot re-read the config file (use restart)."
-        ;;
-  # And this if it cann
-  #reload)
-          #
-          # If the daemon can reload its config files on the fly
-          # for example by sending it SIGHUP, do it here.
-          #
-          # If the daemon responds to changes in its config file
-          # directly anyway, make this a do-nothing entry.
-          #
-          # log_daemon_msg "Reloading $DESC configuration files" "$NAME"
-          # if running ; then
-          #    reload_server
-          #    if ! running ;  then
-          # Process died after we tried to reload
-          #       log_progress_msg "died on reload"
-          #       log_end_msg 1
-          #       exit 1
-          #    fi
-          # else
-          #    log_progress_msg "server is not running"
-          #    log_end_msg 1
-          #    exit 1
-          # fi
-                                                                                    #;;
-
+        log_daemon_msg "Reloading $DESC configuration files" "$NAME"
+        if running ; then
+	    reload_server
+	    if ! running ;  then
+		# Process died after we tried to reload
+                log_progress_msg "died on reload"
+                log_end_msg 1
+                exit 1
+	    fi
+	else
+	    log_progress_msg "server is not running"
+	    log_end_msg 1
+	    exit 1
+	fi
+        ;;                                                                            #;;
   *)
 	N=/etc/init.d/$NAME
 	echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2