This is an old revision of the document!


Weborf can run as a daemon, leaving the terminal free.
This can be achieved by using the -d option.

Then the terminal will give its prompt again and weborf will not terminate when the terminal is terminated.
Weborf's output will still be displayed on the terminal.

The script to use weborf as a daemon (and start it as a service in runlevels) is installed when doing “make install”.

Init

If you want to handle weborf as a normal daemon you will need a script in /etc/init.d/

You can use this simple script or write your own.

#!/bin/bash
USERNAME="www-data";
BASEDIR="/var/www/"
USERID=`cat /etc/passwd | fgrep $USERNAME | cut -d: -f3`
if test -z $USERID
then
    echo "Unable to find user www-data"
    echo "Change the daemon script in $0"
    exit 1
fi
case $1 in
        start)
                weborf -dp80 -u $USERID -b $BASEDIR;;
        stop)
 
                kill `pidof weborf`;;
    restart)
        kill `pidof weborf`
        weborf -dp80 -u $USERID -b $BASEDIR;;
        * )
                echo "Usage: $0 {start|stop|restart}";;
esac
daemon.1230802654.txt.gz · Last modified: 2009/01/01 10:37 by LtWorf
 
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki