forked from consensus-oracle/coracle
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.sh
More file actions
45 lines (45 loc) · 925 Bytes
/
Copy pathinit.sh
File metadata and controls
45 lines (45 loc) · 925 Bytes
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
40
41
42
43
44
45
#!/bin/bash
#
# chkconfig: 35 90 12
# description: Foo server
#
# Get function from functions library
. /etc/init.d/functions
# Start the service FOO
start() {
initlog -c "echo -n Starting coracle server: "
cd ~/coracle/web
PORT=3000 supervisor ./bin/www &
### Create the lock file ###
touch /var/lock/subsys/coracle
success $"coracle server startup"
echo
}
# Restart the service FOO
stop() {
initlog -c "echo -n Stopping coracle server: "
kill -9 `pidof node`
### Now, delete the lock file ###
rm -f /var/lock/subsys/FOO
echo
}
### main logic ###
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status node
;;
restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0