Init scripts are expected to return successfully if asked to start a service that is already running or to stop a service that is not running (policy §9.3.2 ¶3).
I suggest the following change:
--- hlbr-1.6~/scripts/hlbr.init
+++ hlbr-1.6/scripts/hlbr.init
@@ -31,8 +31,9 @@
# Actions
case "$1" in
-start) if [ -f $PIDFILE ]; then echo -e "HLBR:\n\nERRO: existe um PID ativo /
ERROR: already exist an active PID\nTente parar o daemon ou remover o arquivo
PID \ Try to stop the daemon or remove the PID file\n\n$PIDFILE\n"; exit 1; fi
+start)
echo "Inicializando o HLBR / Starting HLBR"
+ if [ -f $PIDFILE ]; then echo "OK"; exit 0; fi
cd /etc/hlbr
hlbr $OPTS &
sleep 1
@@ -41,7 +42,7 @@
stop) echo "Parando o HLBR / Stopping HLBR"
if [ -f /sbin/start-stop-daemon ]
then
- start-stop-daemon --stop --quiet --pidfile $PIDFILE --name hlbr
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo --name
hlbr
else
killall hlbr
fi
--- END ---
This init script is generally quite unconventional, and should perhaps
be rewritten.
Ben.
--
Ben Hutchings
If at first you don't succeed, you're doing about average.
signature.asc
Description: This is a digitally signed message part

