init.sh: initialize counter variable in stop()

fixes init.sh stop error on busybox systems: #7535
pull/7536/head
Stephan Klatt 2016-10-28 13:46:13 +02:00 committed by GitHub
parent 017ff229ef
commit 9a880f6144
1 changed files with 1 additions and 0 deletions

View File

@ -157,6 +157,7 @@ function stop() {
echo "Stopping $NAME..."
# Process still up, send SIGTERM and remove PIDFILE
kill -s SIGTERM $PID &>/dev/null && rm -f "$PIDFILE" &>/dev/null
n=0
while true; do
# Enter loop to ensure process is stopped
kill -0 $PID &>/dev/null