[EDIT] I have found why it did not work, I just had to add the directive
server.pid-file = "/var/run/lighttpd.pid"
to the lighttpd.conf file.
I can't figure out why the lighttpd init script doesn't work to stop the server. I'm running Debian 7 Wheezy and Lighttpd 1.4.31. My system is also up-to-date.
When issuing:
# /etc/init.d/lighttpd stop
[ ok ] Stopping web server: lighttpd.
But then lighttpd is still running:
# ps aux | grep lighttpd
root 2024 0.0 0.2 70696 1184 ? S 15:16 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
root 2428 0.0 0.1 7832 880 pts/0 S+ 15:27 0:00 grep lighttpd
When removing "quiet" from the stop part of the script to get more details which gives:
if start-stop-daemon --stop --retry 30 --oknodo \
--pidfile $PIDFILE --exec $DAEMON
I get this output:
# /etc/init.d/lighttpd stop
[....] Stopping web server: lighttpdNo /usr/sbin/lighttpd found running; none killed.
. ok
whereas /usr/sbin/lighttpd is actually running as shown by the ps command.
Thank you for your help.