#!/bin/sh # wikipbx webserver case "$1" in 'start') . /etc/profile pushd /usr/src/wikipbx twistd -o --logfile=/var/log/wikipbx.log -y wikipbxweb/twisteddjango.py > /var/log/wikipbx_startup.log 2>&1 echo started ;; 'stop') ps auxww | grep -i wikipbx | grep -i twisteddjango | awk '{print $2}' | xargs kill ;; *) echo "Usage: $0 { start | stop }" ;; esac exit 0