forked from baliga-lab/cmonkey2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcluster_viewer
More file actions
executable file
·39 lines (34 loc) · 1.03 KB
/
cluster_viewer
File metadata and controls
executable file
·39 lines (34 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/sh
#
# cluster_viewer This shell script takes care of starting and stopping
# the cluster viewer
# It is setup to run a staged Play application (play clean compile stage)
# and can be used to run the cluster viewer as a service in a Debian
# style environment (Debian, Ubuntu, Linux Mint etc.)
NAME=cluster_viewer
CMONKEY_HOME=`pwd`
CLUSTER_VIEWER_HOME=$CMONKEY_HOME
PIDFILE=/tmp/cluster_viewer.pid
DAEMON="cmviewer/main.py"
# Do preliminary checks here, if any
# Handle manual control parameters like start, stop, status, restart, etc.
case "$1" in
start)
echo -n "Starting daemon: "$NAME
start-stop-daemon --start --background --chdir $CLUSTER_VIEWER_HOME --pidfile $PIDFILE --make-pidfile --exec $DAEMON
echo "."
;;
stop)
echo -n "Stopping daemon: "$NAME
start-stop-daemon --stop --pidfile $PIDFILE
echo "."
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0