#!/bin/sh LIGHTTPD_CONF=/home/USERNAME/etc/lighttpd.conf PIDFILE=/home/USERNAME/var/run/lighttpd.pid case "$1" in start) # Starts the lighttpd deamon echo "Starting Lighttpd" /usr/local/sbin/lighttpd -f $LIGHTTPD_CONF ;; stop) # stops the daemon bt cat'ing the pidfile echo "Stopping Lighttpd" kill -9 `cat $PIDFILE` # kills the dispatch.fcgis ps axww | grep dispatch | egrep -v 'grep' | awk '{ print $1 }' | xargs kill -9 ;; restart) ## Stop the service regardless of whether it was ## running or not, start it again. echo "Restarting Lighttpd" $0 stop $0 start ;; reload) # reloads the config file by sending HUP echo "Reloading config" kill -HUP `cat $PIDFILE` ;; *) echo "Usage: lighttpdctl (start|stop|restart|reload)" exit 1 ;; esac
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Updated lighttpd control script to kill FCGIs (See related posts)
Comments on this post
Thanks!
You need to create an account or log in to post comments to this site.
Related Posts
» Typo under lighttpd in lighttpd ruby rails typo ruby-fcgi
» Johan Sörensen's lighttpd co... in lighttpd rails lighttpdctrl
» yet another lighttpd restart... in fastcgi lighttpd shell bash lighttpdctl fcgi catalyst
» How TextDrive does both PHP ... in php fastcgi lighttpd rails fcgi
» Example lighttpd config for ... in php lighttpd rails examples filenice
» killing your own dispatch.fcgis in awk lighttpd ruby rails
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails