LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-19-2006, 03:28 PM   #1
Feinom
Member
 
Registered: Mar 2004
Location: Norway
Distribution: Slackware 12.2
Posts: 40

Rep: Reputation: 17
Smile lighttpd startup script


Hey!
I made a startup script for lighttpd, and thought I'd share it in case anyone else wants to use it... I know it lacks commenting, but I just don't care
Just modify it to fit your configuration :-)

rc.lighttpd :
Quote:
lighttpd_start() {
if [ -x /usr/local/sbin/lighttpd ]; then
if ! `test -e /var/run/lighttpd.pid`; then
/usr/local/sbin/lighttpd -f /etc/lighttpd.conf
echo "Starting lighttpd"
else
echo "Lighttpd is already running!"
fi
fi
}

lighttpd_stop() {
echo "Stopping lighttpd"
killall lighttpd
}

lighttpd_restart() {
lighttpd_stop
sleep 1
lighttpd_start
}

case "$1" in
'start')
lighttpd_start
;;
'stop')
lighttpd_stop
;;
'restart')
lighttpd_restart
;;
*)
echo "usage $0 start|stop|restart"
;;
esac
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lighttpd: multiple virtual hosts? neocookie Linux - Software 8 03-27-2006 11:37 PM
stopping lighttpd viniosity Debian 2 02-28-2006 06:44 PM
'cannot stat' script in /etc/rc.d/, try to run script at startup quintan Linux - Software 1 11-21-2005 03:53 AM
How to call a script from a system startup script? jonatito Linux - Newbie 7 11-11-2005 10:40 PM
apache proxypass, or lighttpd php belorion Linux - General 2 07-15-2005 11:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration