X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=scripts%2Fserver-ctl;h=57265c8c1837b0802f584f91d865322f6915fc2e;hb=840af79b7d2c41ed0dfd70b496b6b5f3ffefc510;hp=61ebf97a7063e90d2b77426b73989f01f67c9f5b;hpb=59205eef9b2ccc63413928015c1b6f5244f64c8a;p=roundup.git diff --git a/scripts/server-ctl b/scripts/server-ctl index 61ebf97..57265c8 100755 --- a/scripts/server-ctl +++ b/scripts/server-ctl @@ -2,20 +2,23 @@ # # Configuration -# -PORT=8080 -PIDFILE="/usr/local/roundup/var/roundup-server.pid" -LOGFILE="/usr/local/roundup/var/roundup-server.log" -OTHERARGS="" -TRACKERS="cg=/usr/local/roundup/trackers/cg" +# +CONFFILE="/var/roundup/server-config.ini" -SERVER="/usr/local/bin/roundup-server -l ${LOGFILE} -d ${PIDFILE} -p ${PORT} ${OTHERARGS} ${TRACKERS}" +# this will end up with extra space, but it should be ignored in the script +PIDFILE=`grep '^pidfile' ${CONFFILE} | awk -F = '{print $2}' ` +SERVER="/usr/local/bin/roundup-server -C ${CONFFILE}" ERROR=0 ARGV="$@" -if [ "x$ARGV" = "x" ] ; then +if [ "x$ARGV" = "x" ] ; then ARGS="help" fi +if [ -z "${PIDFILE}" ] ; then + echo "pidfile option must be set in configuration file" + exit 1 +fi + for ARG in $@ $ARGS do # check for pidfile