#!/bin/sh LIGHTTPD_CONF=/home/jarkko/domains/piforienteering.fi/sites/piffen-new/config/lighttpd.conf PIDFILE=/home/jarkko/var/run/lighttpd.pid case "$1" in start) # Starts the lighttpd deamon echo "Starting Lighttpd" lighttpd -f $LIGHTTPD_CONF ;; stop) # stops the daemon bt cat'ing the pidfile echo "Stopping Lighttpd" kill `cat $PIDFILE` ;; 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: lighttpdctrl (start|stop|restart|reload)" exit 1 ;; esac