#!/usr/local/bin/bash # run from cron with a line like # 0,10,20,30,40,50 * * * * /home/lightpress/bin/tracd_start.sh & # your home dir HOME=/users/home/lightpress # tracd args #TRACD=$HOME/bin/tracd_async.py TRACD=/usr/local/bin/tracd TRACD_PORT=9011 TRAC_PROJECT=lightpress TRAC_HTDIGEST=$HOME/etc/trac.digest.passwd TRAC_REALM=lightpress.org TRAC_DIR=$HOME/trac/lightpress # uncomment and edit the line below to add a folder to python's sys.path #export PYTHONPATH=$HOME/python2.4/site-packages date_now=$(date +'%b %d, %Y %H:%M:%S') echo "[$date_now] trac_start.sh started" running=$(ps -auxww |grep $TRACD |grep -v grep) echo "[$date_now] ps grep result: **$running**" if [ -z "$running" ]; then echo "[$date_now] starting tracd" #>&2 $TRACD -p $TRACD_PORT --auth $TRAC_PROJECT,$TRAC_HTDIGEST,$TRAC_REALM $TRAC_DIR & fi