| The Following User Says Thank You to digitalvoid For This Useful Post: | ||
|
|
2010-01-17
, 22:36
|
|
|
Posts: 1,034 |
Thanked: 784 times |
Joined on Dec 2007
@ Annapolis, MD
|
#2
|
| The Following 2 Users Say Thank You to cddiede For This Useful Post: | ||
|
|
2010-01-18
, 00:00
|
|
Posts: 65 |
Thanked: 21 times |
Joined on Feb 2008
|
#3
|
description "lighttpd - a lightweight web server" start on stopped rcS stop on starting shutdown console output exec /usr/sbin/lighttpd -f /etc/lighttpd.conf respawn
| The Following 2 Users Say Thank You to dvergin For This Useful Post: | ||
|
|
2010-01-18
, 13:25
|
|
Posts: 200 |
Thanked: 300 times |
Joined on Nov 2009
@ The Netherlands
|
#4
|
description "lighttpd - a lightweight web server" start on stopped rcS stop on starting shutdown console output exec /usr/sbin/lighttpd -f /etc/lighttpd.conf respawn
#! /bin/sh
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
#
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/lighttpd
NAME=lighttpd
DESC=lighttpd
DAEMON_OPTS=-f\ /etc/lighttpd.conf
test -x $DAEMON || exit 0
# Include lighttpd defaults if available
if [ -f /etc/default/lighttpd ] ; then
. /etc/default/lighttpd
fi
set -e
case "$1" in
start)
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \
--exec $DAEMON
echo "$NAME."
;;
#reload)
#
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
# echo "Reloading $DESC configuration files."
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
# /var/run/$NAME.pid --exec $DAEMON
#;;
force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart" except that it does nothing if the
# daemon isn't already running.
# check wether $DAEMON is running. If so, restart
start-stop-daemon --stop --test --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON \
&& $0 restart \
|| exit 0
;;
restart)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON
sleep 1
start-stop-daemon --start --quiet --pidfile \
/var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload}" >&2
exit 1
;;
esac
exit 0
/etc/init.d/lighttpd start
start lighttpd
|
|
2010-01-18
, 23:03
|
|
Posts: 65 |
Thanked: 21 times |
Joined on Feb 2008
|
#5
|
It doesn't work for me:
...Maybe something simple but I can't see it...
ls -l /etc/event.d/lighttpd
-rw-r--r-- 1 root root
ps | grep lighttpd
687 root 2492 S /usr/sbin/lighttpd -f /etc/lighttpd.conf
| The Following User Says Thank You to dvergin For This Useful Post: | ||
|
|
2010-01-18
, 23:21
|
|
Posts: 200 |
Thanked: 300 times |
Joined on Nov 2009
@ The Netherlands
|
#6
|
ls -l /etc/event.d/lighttpd
-rw-r--r-- 1 root root
ps | grep lighttpd
687 root 2492 S /usr/sbin/lighttpd -f /etc/lighttpd.conf
start lighttpd
/etc/init.d/lighttpd start
/usr/sbin/lighttpd -f /etc/lighttpd.conf
|
|
2010-01-18
, 23:34
|
|
Posts: 65 |
Thanked: 21 times |
Joined on Feb 2008
|
#7
|
Have you performed the recent "major" OS upgrade? If I go to Settings->About_Product, I see: Version: 2.2009.51-1.002
How exactly did you put /etc/event.d/lighttpd on your N900? Did you type it in by hand or copy/paste from my post above? Did you perhaps create it on a windows machine and move it to the N900?
|
|
2010-01-18
, 23:38
|
|
Posts: 200 |
Thanked: 300 times |
Joined on Nov 2009
@ The Netherlands
|
#8
|
|
|
2010-01-19
, 00:30
|
|
Posts: 65 |
Thanked: 21 times |
Joined on Feb 2008
|
#9
|
|
|
2010-01-19
, 00:41
|
|
Posts: 65 |
Thanked: 21 times |
Joined on Feb 2008
|
#10
|
I have lighttpd installed on my n900 and works great but I have to manualy start the server (/etc/init.d/lighttpd start).
How can I make lighttpd run at boot of the device?
I'm not known to implement this.... (bit of a linux noob but eager to learn