sqlutil Code
Status: Alpha
Brought to you by:
igbsoftware
#!/bin/bash
if [ $# -lt 1 ]; then
echo "usage: $0 appname service [service-args] "
exit 1
fi
APPNAME=$1
if [ $# -gt 1 ]; then SERVICE=$2; else SERVICE=${APPNAME}; fi
if [ $# -gt 2 ]; then SERVICE="${SERVICE} $3 $4 $5 $6 $7 $8 $9"; fi
[ -e ${APPNAME}.pid ] && kill `cat ${APPNAME}.pid`
echo "twistd --logfile ${APPNAME}.log --pidfile ${APPNAME}.pid --prefix ${APPNAME} ${SERVICE}"
twistd --logfile ${APPNAME}.log --pidfile ${APPNAME}.pid --prefix ${APPNAME} ${SERVICE}