[go: up one dir, main page]

Menu

[599fc9]: / sqlutil / test  Maximize  Restore  History

Download this file

16 lines (11 with data), 478 Bytes

#!/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}