Skip to content

Commit d777203

Browse files
author
Alexander Smishlajev
committed
use server configuration file [SF#1443805]
1 parent e03881d commit d777203

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

scripts/server-ctl

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,23 @@
22

33
#
44
# Configuration
5-
#
6-
PORT=8080
7-
PIDFILE="/usr/local/roundup/var/roundup-server.pid"
8-
LOGFILE="/usr/local/roundup/var/roundup-server.log"
9-
OTHERARGS=""
10-
TRACKERS="cg=/usr/local/roundup/trackers/cg"
5+
#
6+
CONFFILE="/var/roundup/server-config.ini"
117

12-
SERVER="/usr/local/bin/roundup-server -l ${LOGFILE} -d ${PIDFILE} -p ${PORT} ${OTHERARGS} ${TRACKERS}"
8+
# this will end up with extra space, but it should be ignored in the script
9+
PIDFILE=`grep '^pidfile' ${CONFFILE} | awk -F = '{print $2}' `
10+
SERVER="/usr/local/bin/roundup-server -C ${CONFFILE}"
1311
ERROR=0
1412
ARGV="$@"
15-
if [ "x$ARGV" = "x" ] ; then
13+
if [ "x$ARGV" = "x" ] ; then
1614
ARGS="help"
1715
fi
1816

17+
if [ -z "${PIDFILE}" ] ; then
18+
echo "pidfile option must be set in configuration file"
19+
exit 1
20+
fi
21+
1922
for ARG in $@ $ARGS
2023
do
2124
# check for pidfile

0 commit comments

Comments
 (0)