Skip to content
Snippets Groups Projects
Commit a0aa2026 authored by sveseli's avatar sveseli
Browse files

updated service scripts

parent d03af70a
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
# Helper script to start and stop DAQ node services
MYDIR=`dirname $0` && cd $MYDIR && MYDIR=`pwd`
# 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
cd $MYDIR
serviceList="\$"${action}List
serviceList=`eval "echo $serviceList"`
for service in $serviceList; do
dm-$service $action
sleep 1
done
#!/bin/sh
# Helper script to start and stop DAQ node services
MYDIR=`dirname $0` && cd $MYDIR && MYDIR=`pwd`
# The list below defines order of starting/stopping services
startList="postgresql glassfish ds-web-service"
stopList="ds-web-service glassfish postgresql"
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
cd $MYDIR
serviceList="\$"${action}List
serviceList=`eval "echo $serviceList"`
for service in $serviceList; do
dm-$service $action
sleep 1
done
......@@ -22,6 +22,8 @@
# Arguments
ACTION=$1
DM_DB_NAME=$2
DM_DB_NAME=${DM_DB_NAME:=dm}
# Set root to default if needed.
MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
......@@ -48,7 +50,7 @@ DM_NODE_DIR=${DM_OPT_DIR}/node
DM_FOREVER_DIR=${DM_NODE_DIR}/bin/node_modules/forever
DM_MONGO_EXPRESS_DIR=${DM_NODE_DIR}/bin/node_modules/mongo-express
DM_DAEMON_NAME="DM Mongo Express"
DM_DAEMON_NAME="${DM_DB_NAME}.MongoExpress"
DM_DAEMON_CMD=${DM_FOREVER_DIR}/bin/forever
DM_DAEMON_WORK_DIR=${DM_INSTALL_DIR}/var/run/mongo-express
DM_DAEMON_PID_FILE=${DM_INSTALL_DIR}/var/run/mongo-express.pid
......
......@@ -22,6 +22,8 @@
# Arguments
ACTION=$1
DM_DB_NAME=$2
DM_DB_NAME=${DM_DB_NAME:=dm}
# Set root to default if needed.
MY_DIR=`dirname $0` && cd $MY_DIR && MY_DIR=`pwd`
......@@ -48,7 +50,7 @@ DM_MONGODB_DIR=${DM_OPT_DIR}/mongodb/${DM_HOST_ARCH}
DM_MONGODB_DATA_DIR=${DM_MONGODB_DIR}/data
mkdir -p ${DM_MONGODB_DATA_DIR}
DM_DAEMON_NAME="DM MongoDB"
DM_DAEMON_NAME="${DM_DB_NAME}.MongoDB"
DM_DAEMON_CMD=${DM_MONGODB_DIR}/bin/mongod
DM_DAEMON_PID_FILE=${DM_INSTALL_DIR}/var/run/mongodb.pid
DM_DAEMON_LOG_FILE=${DM_INSTALL_DIR}/var/log/mongodb.log
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment