RLP ctl script kills RLP before starting
When starting RLP we want to ensure there is not already a running instance of the RLP.
-#!/bin/bash
+#!/bin/bash -e
RUN_DIR=/var/vcap/sys/run/reverse_log_proxy
LOG_DIR=/var/vcap/sys/log/reverse_log_proxy
@@ -11,6 +11,13 @@ PACKAGE_DIR=/var/vcap/packages/reverse_log_proxy
case $1 in
start)
+ set +e
+ killall -15 rlp
+ killall -9 rlp
+ killall -2 rlp
+ killall -3 rlp
+ set -e
+
mkdir -p $RUN_DIR $LOG_DIR
chown -R vcap:vcap $RUN_DIR $LOG_DIR
@@ -48,13 +55,20 @@ exec chpst -u vcap:vcap ./rlp \
;;
stop)
-
+ set +e
+ killall -15 rlp
killall -9 rlp
+ killall -2 rlp
+ killall -3 rlp
+ set -e
+
rm -f $PIDFILE
;;
*)
-echo "Usage: ctl {start|stop}" ;;
+ echo "Usage: reverse_log_proxy_ctl {start|stop}"
+
+ ;;
esac
