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