r24647 - in /scripts/KGB/debian: changelog init

tincho at users.alioth.debian.org tincho at users.alioth.debian.org
Wed Aug 27 08:29:34 UTC 2008


Author: tincho
Date: Wed Aug 27 08:29:32 2008
New Revision: 24647

URL: http://svn.debian.org/wsvn/?sc=1&rev=24647
Log:
debian/init: make use of the SIG(HUP|QUIT) handlers.

Modified:
    scripts/KGB/debian/changelog
    scripts/KGB/debian/init

Modified: scripts/KGB/debian/changelog
URL: http://svn.debian.org/wsvn/scripts/KGB/debian/changelog?rev=24647&op=diff
==============================================================================
--- scripts/KGB/debian/changelog (original)
+++ scripts/KGB/debian/changelog Wed Aug 27 08:29:32 2008
@@ -15,5 +15,6 @@
   * debian/*, server/KGB, Makefile: match the /etc directory name with the
     package name.
   * client/*: remove hardcodings.
+  * debian/init: make use of the SIG(HUP|QUIT) handlers.
 
  -- Damyan Ivanov <dmn at debian.org>  Mon, 28 Jul 2008 14:44:04 +0300

Modified: scripts/KGB/debian/init
URL: http://svn.debian.org/wsvn/scripts/KGB/debian/init?rev=24647&op=diff
==============================================================================
--- scripts/KGB/debian/init (original)
+++ scripts/KGB/debian/init Wed Aug 27 08:29:32 2008
@@ -86,12 +86,15 @@
 # Function that sends a SIGHUP to the daemon/service
 #
 do_reload() {
-	#
-	# If the daemon can reload its configuration without
-	# restarting (for example, when it is sent a SIGHUP),
-	# then implement that here.
-	#
 	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	return 0
+}
+
+#
+# Function that sends a SIGQUIT to the daemon/service
+#
+do_restart() {
+	start-stop-daemon --stop --signal 3 --quiet --pidfile $PIDFILE --name $NAME
 	return 0
 }
 
@@ -114,20 +117,17 @@
 		2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
 	esac
 	;;
-  #reload|force-reload)
-	#
-	# If do_reload() is not implemented then leave this commented out
-	# and leave 'force-reload' as an alias for 'restart'.
-	#
-	#log_daemon_msg "Reloading $DESC" "$NAME"
-	#do_reload
-	#log_end_msg $?
-	#;;
-  restart|force-reload)
-	#
-	# If the "reload" option is implemented then remove the
-	# 'force-reload' alias
-	#
+  restart)
+	log_daemon_msg "Reloading $DESC" "$NAME"
+	do_restart
+	log_end_msg $?
+	;;
+  reload|force-reload)
+	log_daemon_msg "Reloading $DESC" "$NAME"
+	do_reload
+	log_end_msg $?
+	;;
+  force-restart)
 	log_daemon_msg "Restarting $DESC" "$NAME"
 	do_stop
 	case "$?" in
@@ -146,8 +146,8 @@
 	esac
 	;;
   *)
-	#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
-	echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+	echo "Usage: $SCRIPTNAME {start|stop|restart|force-restart|reload|force-reload}" >&2
+	#echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
 	exit 3
 	;;
 esac




More information about the Pkg-perl-cvs-commits mailing list