Package: hylafax-server
Version: 4.3.1-7
Severity: wishlist

It would be nice if hylafax would store its process id (in /var/run
preferably) so that one can monitor this service with arbitrary
monitor software.  At the moment no hylafax server stores its process
id somewhere.

With current start-stop-daemon this task can be out-sourced to Debian
tools without the need to change the HylaFAX code.  It would be nice
if you could apply the attached patch to the rc script so that it will
write the hfaxd pid into a file.

Regards,

        Joey

-- 
Debian automatically detects USB sticks.  This is so non-Debian.   -- Joey

Please always Cc to me when replying to me on the lists.
--- hylafax.orig	2008-02-05 12:56:59.000000000 +0100
+++ hylafax	2008-02-05 12:57:34.000000000 +0100
@@ -20,6 +20,7 @@
 HYLAFAX_HOME=/var/spool/hylafax
 FAXGETTY=/usr/sbin/faxgetty
 FAXMODEM=/usr/sbin/faxmodem
+PIDFILE=/var/run/hfaxd.pid
 
 OLDPROT=
 NEWPROT=
@@ -207,7 +208,7 @@
     p=$(ps --no-headers -C hfaxd -o pid)
     if [ -n "$p" ]
     then
-        start-stop-daemon --stop --exec /usr/sbin/hfaxd -- $BINDTO $NEWPROT $OLDPROT $SNPP
+        start-stop-daemon --stop --exec /usr/sbin/hfaxd --pidfile $PIDFILE -- $BINDTO $NEWPROT $OLDPROT $SNPP
  	sleep 1
  	p=$(ps --no-headers -C hfaxd -o pid)
  	[ -n "$p" ] && kill $p
@@ -265,7 +266,7 @@
       start-stop-daemon --start --exec /usr/sbin/faxq
 
       log_progress_msg "hfaxd"
-      start-stop-daemon --start --exec /usr/sbin/hfaxd -- $BINDTO $NEWPROT $OLDPROT $SNPP
+      start-stop-daemon --start --exec /usr/sbin/hfaxd --make-pidfile --pidfile $PIDFILE --background -- -d $BINDTO $NEWPROT $OLDPROT $SNPP
 
       cd ${HYLAFAX_HOME}/etc
       devices="`echo_fax_devices`"

Reply via email to