Updated the startup script so multiple runs of start work properly

Change-Id: I3fead8d2795f05648cc796fd6bb714b8267034d9
This commit is contained in:
Tim Kuhlman 2014-07-25 13:30:13 -06:00
parent cdea9bdcb2
commit cd367431d8

View File

@ -11,7 +11,13 @@
case "$1" in
start)
sudo -Hu thresh /opt/storm/current/bin/storm jar /opt/mon/mon-thresh.jar com.hpcloud.mon.ThresholdingEngine /etc/mon/mon-thresh-config.yml thresh-cluster
$0 status
if [ $? -ne 0 ]; then
sudo -Hu thresh /opt/storm/current/bin/storm jar /opt/mon/mon-thresh.jar com.hpcloud.mon.ThresholdingEngine /etc/mon/mon-thresh-config.yml thresh-cluster
else
echo "Mon-thresh is already running"
fi
exit 0
;;
stop)
sudo -Hu thresh /opt/storm/current/bin/storm kill thresh-cluster