Commit 4f5ce6d4 authored by Adam Wujek's avatar Adam Wujek 💬

rootfs: don't increase start counter when stopping lighttpd

Fix copy-paste error.
Distinguish between start-stop-daemon return value 0, 1 and the rest.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 1cfa8ba3
......@@ -21,23 +21,27 @@ start() {
# running
start-stop-daemon -q -p /var/run/lighttpd.pid -S \
--exec /usr/sbin/lighttpd -- -f /var/www/lighttpd.config
if [ $? -eq 0 ]; then
ret=$?
if [ $ret -eq 0 ]; then
start_counter
echo "OK"
else
elif [ $ret -eq 1 ]; then
echo "Failed (already running?)"
else
echo "Failed"
fi
}
stop() {
echo -n "Stopping lighttpd daemon: "
start-stop-daemon -K -q -p /var/run/lighttpd.pid
if [ $? -eq 0 ]; then
start_counter
echo "OK"
else
echo "Failed"
fi
}
restart() {
stop
start
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment