[Zope] Debian Startup Script needed

Oleg Broytmann Oleg Broytmann <phd@phd.pp.ru>
Fri, 9 Nov 2001 12:20:20 +0300


On Fri, Nov 09, 2001 at 12:36:03AM -0800, Zope wrote:
> So, I put out this call: If you've got Zope starting automatically on a
> Debian system, could you please share your startup script?

#! /bin/sh

zopedir=/usr/local/Zope
PATH=.:$PATH

case "$1" in
  start)
    echo -n "Starting zope daemon: zope"
    cd $zopedir
    su - phd -c $zopedir/start >var/error.log 2>&1 &
    echo "."
    ;;

  stop)
    echo -n "Stopping zope daemon: zope"
    cd $zopedir
    ./stop
    rm -f var/*.pid var/pcgi.soc
    echo "."
    ;;

  restart)
    $0 stop
    sleep 3
    $0 start
    ;;

  reload)
    $0 restart
    ;;

  force-reload)
    $0 restart
    ;;

  *)
    echo "Usage: /etc/init.d/zope {start|stop}"
    exit 1
    ;;
esac

exit 0

Oleg.
-- 
     Oleg Broytmann     http://www.zope.org/Members/phd/     phd@phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.