3 # pazpar2.sh - pazpar2 start/stop script
5 : ${PAZPAR2_HOME=$HOME/pazpar2}
6 : ${pazpar2_program=$PAZPAR2_HOME/src/pazpar2}
7 : ${pazpar2_config=$PAZPAR2_HOME/etc/pazpar2.cfg}
8 : ${pazpar2_pid=$PAZPAR2_HOME/pazpar2.pid}
9 : ${pazpar2_log=$PAZPAR2_HOME/pazpar2.log}
15 $pazpar2_program -D -l $pazpar2_log -p $pazpar2_pid -f $pazpar2_config "$@"
19 test -f $pazpar2_pid && \
20 kill -0 `cat $pazpar2_pid` 2>/dev/null && \
21 kill -TERM `cat $pazpar2_pid`
24 # graceful restart - not yet implemented by pazpar2
26 test -f $pazpar2_pid && kill -HUP `cat $pazpar2_pid`
31 sleep 1 # let the OS give the port address free
36 echo "Usage: `basename $0` [ start [pazpar2 options]] [ stop | restart ]" >&2