Package: gmediaserver
Version: 0.13.0-6
Severity: wishlist
Tags: patch

Hi!

The daemon supports reloading the db while running, by sending a
SIGUSR1 signal to it.

I've modified the init script to handle that. Attached a patch against
the packaging.

thanks,
guillem
diff -Nru gmediaserver-0.13.0/debian/init.d gmediaserver-0.13.0/debian/init.d
--- gmediaserver-0.13.0/debian/init.d	2010-05-10 15:13:47.000000000 +0200
+++ gmediaserver-0.13.0/debian/init.d	2011-01-22 07:29:00.000000000 +0100
@@ -47,24 +47,12 @@
 		--oknodo --exec $DAEMON
 	echo "$NAME."
 	;;
-  #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.
-	#
-	# echo "Reloading $DESC configuration files."
-	# start-stop-daemon --stop --signal 1 --quiet --pidfile \
-	#	/var/run/$NAME.pid --exec $DAEMON
-  #;;
-  restart|force-reload)
-	#
-	#	If the "reload" option is implemented, move the "force-reload"
-	#	option to the "reload" entry above. If not, "force-reload" is
-	#	just the same as "restart".
-	#
+  reload|force-reload)
+	echo "Reloading $DESC configuration files."
+	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME/$NAME.pid \
+		--signal USR1 --exec $DAEMON
+	;;
+  restart)
 	echo -n "Restarting $DESC: "
 	start-stop-daemon --stop --quiet --pidfile /var/run/$NAME/$NAME.pid \
 		--exec $DAEMON

Reply via email to