lighttpd forum lighty > Lighty /etc/init.d/lighttpd stop fails

Posted by Jeremy (Guest)
on 30.08.2006 06:19
I'm trying to get lighty to stop using /etc/init.d/lighttpd stop and it
fails every time. Any ideas?

using ubuntu dapper.
Posted by Kevin Worthington
on 30.08.2006 17:17
Jeremy wrote:
> I'm trying to get lighty to stop using /etc/init.d/lighttpd stop and it
> fails every time. Any ideas?
> 
> using ubuntu dapper.

I'm not actively using ubuntu, but this is supposed to help:
http://justasloud.org/2006/fixing-lighttpd-on-debianubuntu/
Posted by Don Pedro
on 30.08.2006 17:49
I'm not using ubuntu, but to restart lighttpd I'm using:

killall -9 lighttpd; killall -9 php-cgi; killall -9 gam_server; 
/etc/init.d/lighttpd zap; /etc/init.d/lighttpd start

I know it's not GRACEFUL restart, but this is the fastest and 100% way 
to really restart lighttpd/php/fam.
Posted by Thomas Bergheim
on 31.08.2006 01:43
Jeremy wrote:
> I'm trying to get lighty to stop using /etc/init.d/lighttpd stop and it
> fails every time. Any ideas?
> 
> using ubuntu dapper.

What does it say? It could be many things. Is the pid-file which the 
init.d script relies on being generated (look in your lighttpd.conf, 
"server.pid-file"). Not sure where /etc/init.d/lighttpd looks for the 
file in ubuntu, but just set server.pid-file to whatever is set in 
/etc/init.d/lighttpd.

I'm guessing this fixes your problem, since you aren't saying that 
"start" fails as well.
Posted by Tim Hj
on 07.08.2007 02:16
Thomas Bergheim wrote:
> Jeremy wrote:
>> I'm trying to get lighty to stop using /etc/init.d/lighttpd stop and it
>> fails every time. Any ideas?
>> 
>> using ubuntu dapper.
> 
> What does it say? It could be many things. Is the pid-file which the 
> init.d script relies on being generated (look in your lighttpd.conf, 
> "server.pid-file"). Not sure where /etc/init.d/lighttpd looks for the 
> file in ubuntu, but just set server.pid-file to whatever is set in 
> /etc/init.d/lighttpd.
> 
> I'm guessing this fixes your problem, since you aren't saying that 
> "start" fails as well.

Hey,.. mine's failing on start!! sounds like you have some other
solution in mind for this specific problem. Any 'service lighttpd
XXXXX'/'/etc/init.d/lighttpd XXX' commands dump straight to the command
line with no output and no error...

I'm having to do
kill -9 lighttpd
lighttpd -f /etc/lighttpd/lighttpd.conf
for restart... anyone got any ideas?

ps. server.pid setting in conf is setup and working correctly,...
Posted by Burak Tepeyurt (Guest)
on 20.10.2008 09:35
hi

[root@voipdestek]#vi /etc/init.d/lighttpd


#!/bin/sh

if [ ! -f $lighttpd ]
then
echo "lighttpd cannot start"
exit 1
fi
case "$1" in
'start')
lighttpd -f /usr/local/lighttpd.conf
;;
'stop')
killall -9 lighttpd; killall -9 php-cgi;
;;
*)
echo "Usage: $0 { start | stop}"
exit 1
;;
esac
exit 0
#

[root@voipdestek]#chmod 755 /etc/init.d/lighttpd

[root@voipdestek]#/etc/init.d/lighttpd
Usage: /etc/init.d/lighttpd { start | stop}


[root@voipdestek]#/etc/init.d/lighttpd start
[root@voipdestek]#/etc/init.d/lighttpd stop


voipdestek.com