Newer
Older
#!/bin/sh
# Helper script to start and stop DAQ node services
# The list below defines order of starting/stopping services
startList="mongodb mongo-express daq-web-service cat-web-service"
stopList="cat-web-service daq-web-service mongo-express mongodb"
restartList=$startList
statusList=$startList
# Check action
action=$1
case $action in
start|stop|restart|status)
;;
*)
echo $"Usage: $0 {start|stop|status|restart}"
exit 1
esac
# Perform action
serviceList="\$"${action}List
serviceList=`eval "echo $serviceList"`
for service in $serviceList; do