lighttpd forum lighty > lighttpd script - no rc.status

Posted by Joe (Guest)
on 18.02.2006 21:04
I'm using Redhat 9 and the lighttpd script that goes in /etc/init.d 
doesn't work because there isn't a rc.status file on my system. How can 
I get it to work?

Thanks
Joe
on 18.02.2006 22:09
I am also on RH9, and it works

does it mean you are unable to use commands:

# service lighttpd start
# service lighttpd stop

?

in any case you can always start lighty at boot time
by adding below line to your /etc/rc.d/rc.local file

/etc/rc.d/init.d/lighttpd start


HTH
---
Albatros Vep Taloha
http://www.host8.biz
Posted by Joe (Guest)
on 18.02.2006 22:42
Albatros Vep Taloha wrote:
> I am also on RH9, and it works
> 
> does it mean you are unable to use commands:
> 
> # service lighttpd start
> # service lighttpd stop
> 
> ?
> 
> in any case you can always start lighty at boot time
> by adding below line to your /etc/rc.d/rc.local file
> 
> /etc/rc.d/init.d/lighttpd start
> 
> 
> HTH
> ---
> Albatros Vep Taloha
> http://www.host8.biz

Right - it doesn't work. I get this error:

/etc/init.d/lighttpd: line 53: /etc/rc.status: No such file or directory


Joe
on 18.02.2006 22:57
You are using: doc/rc.lighttpd template
but you should use doc/rc.lighttpd.redhat instead
if you are on Redhat

HTH
---
Albatros Vep Taloha
http://www.host8.biz
Posted by Joe (Guest)
on 19.02.2006 03:49
Ahhh! I didn't see that. Thanks!

Joe
Posted by Mitja (Guest)
on 24.05.2006 10:31
What about for Ubuntu? I have the same problem: /etc/init.d/lighttpd:
line 53: /etc/rc.status: No such file or directory
Posted by Stan Papusa (Guest)
on 24.05.2006 15:20
Mitja wrote:
> What about for Ubuntu? I have the same problem: /etc/init.d/lighttpd:
> line 53: /etc/rc.status: No such file or directory

For Ubuntu .. try to add in synaptic lightpd packages. It works very 
good.
Posted by niarevol (Guest)
on 15.01.2007 06:23
Stan Papusa wrote:
> Mitja wrote:
>> What about for Ubuntu? I have the same problem: /etc/init.d/lighttpd:
>> line 53: /etc/rc.status: No such file or directory
> 
> For Ubuntu .. try to add in synaptic lightpd packages. It works very 
> good.

But,if I want to install it, and do not use synaptic lightpd 
packages,how am I doing?
And I found the same error:
line 53: /etc/rc.status: No such file or directory.
Posted by Christian Hoffmann
on 15.01.2007 13:52
niarevol wrote:
> But,if I want to install it, and do not use synaptic lightpd 
> packages,how am I doing?
Copy the init script from a lighttpd install which was managed by apt* 
;)

As Ubuntu now seems to use upstart, a completely different init script 
may be necessary.
Posted by Jeff Minard (Guest)
on 13.02.2007 15:18
Christian Hoffmann wrote:
> niarevol wrote:
>> But,if I want to install it, and do not use synaptic lightpd 
>> packages,how am I doing?
> Copy the init script from a lighttpd install which was managed by apt* 
> ;)
> 
> As Ubuntu now seems to use upstart, a completely different init script 
> may be necessary.

/etc/init.d/lighttpd

-------------------------------------------------------------
#! /bin/sh
set -e

# /etc/init.d/lighttpd: start and stop lighttpd daemon

LIGHTY=/usr/local/lighttpd/sbin/lighttpd
LIGHTYCONFIG=/etc/lighttpd/lighttpd.conf

test -x $LIGHTY || exit 10
test -e $LIGHTYCONFIG || exit 11

. /lib/lsb/init-functions

case "$1" in
  start)
        log_begin_msg "Starting lighttpd..."
        start-stop-daemon --start --quiet --pidfile 
/var/run/lighttpd.pid --exec $LIGHTY -- -f $LIGHTYCONFIG || log_end_msg 
1
        log_end_msg 0
        ;;
  stop)
        log_begin_msg "Stopping lighttpd..."
        start-stop-daemon --stop --quiet --oknodo --pidfile 
/var/run/lighttpd.pid || log_end_msg 1
        log_end_msg 0
        ;;

  reload|force-reload)
        log_begin_msg "Reloading lighttpd..."
        start-stop-daemon --stop --signal 1 --quiet --oknodo --pidfile 
/var/run/lighttpd.pid --exec $LIGHTY -- -f $LIGHTYCONFIG || log_end_msg 
1
        log_end_msg 0
        ;;

  restart)
        log_begin_msg "Restarting lighttpd..."
        start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile 
/var/run/lighttpd.pid
        start-stop-daemon --start --quiet --pidfile 
/var/run/lighttpd.pid --exec $LIGHTY -- -f $LIGHTYCONFIG || log_end_msg 
1
        log_end_msg 0
        ;;

  *)
        log_success_msg "Usage: /etc/init.d/lighttpd 
{start|stop|reload|force-reload|restart}"
        exit 1
esac

exit 0
-------------------------------------------------------------


A start-stop I'm using for lightty. I KNOW that the reload/force-reload 
does not work (wrong signal I think) -- haven't had time to track down 
the right one. However, this script should work with upstart on Ubuntu 
(I'm on 6.06LTS). I haven't figured out how to get it to auto run yet. 
(chkconfig etc)
Posted by Jeff Minard (Guest)
on 13.02.2007 15:20
Attachment: lighttpd.txt
Jeff Minard wrote:
> A start-stop I'm using for lightty. 

Well that got screwed up. Attached.