mirror of
https://github.com/bol-van/zapret.git
synced 2025-04-19 05:22:58 +03:00
sysv init : minor changes
This commit is contained in:
parent
198225bc4f
commit
7d59377009
@ -117,6 +117,7 @@ run_daemon()
|
||||
echo $PID >$PIDFILE
|
||||
else
|
||||
echo could not start daemon $1 : $2 $3
|
||||
false
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@ -130,7 +131,7 @@ stop_daemon()
|
||||
local PIDFILE=$PIDDIR/$DAEMONBASE$1.pid
|
||||
echo "Stopping daemon $1: $2"
|
||||
if exists start-stop-daemon ; then
|
||||
start-stop-daemon --stop --pidfile "$PIDFILE" --exec "$2" || true
|
||||
start-stop-daemon --stop --pidfile "$PIDFILE" --exec "$2"
|
||||
else
|
||||
if [ -f "$PIDFILE" ]; then
|
||||
read PID <"$PIDFILE"
|
||||
@ -138,7 +139,6 @@ stop_daemon()
|
||||
rm -f "$PIDFILE"
|
||||
else
|
||||
echo no pidfile : $PIDFILE
|
||||
false
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user