mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
complain if conf file not found (rather than leaving relay to crash
with an assert whose cause may not be obvious)
This commit is contained in:
parent
1b864b5527
commit
f20f9d6503
1 changed files with 4 additions and 1 deletions
|
@ -8,7 +8,6 @@ PIDFILE=${DIR}/xwrelay.pid
|
|||
CONFFILE=${DIR}/xwrelay.conf
|
||||
IDFILE=${DIR}/nextid.txt
|
||||
CSSFILE=${DIR}/xwrelay.css
|
||||
CONFFILE=${DIR}/xwrelay.conf
|
||||
|
||||
LOGFILE=/tmp/xwrelay_log_$$.txt
|
||||
#LOGFILE=/dev/null
|
||||
|
@ -79,6 +78,10 @@ do_start() {
|
|||
elif pidof $XWRELAY >/dev/null; then
|
||||
echo "already running: pid($XWRELAY)=>$(pidof $XWRELAY)" | tee -a $LOGFILE
|
||||
else
|
||||
if [ ! -e $CONFFILE ]; then
|
||||
echo "unable to find $CONFFILE"
|
||||
exit 1
|
||||
fi
|
||||
echo "starting..." | tee -a $LOGFILE
|
||||
echo "running $XWRELAY $@ -f $CONFFILE -s $CSSFILE" | tee -a $LOGFILE
|
||||
$XWRELAY $@ -f $CONFFILE -i $IDFILE -s $CSSFILE &
|
||||
|
|
Loading…
Reference in a new issue