-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathalexa
More file actions
39 lines (35 loc) · 1015 Bytes
/
alexa
File metadata and controls
39 lines (35 loc) · 1015 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
alexad
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start and stop alexa
# Description: alexa
### END INIT INFO
export PATH=$PATH:/usr/local/debian-chroot/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin:/new/path/variable:/usr/local/n/versions/node/5.6.0/bin/
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
case "$1" in
start)
echo "starting alexa"
forever start --sourceDir=/usr/local/Echo/ server.js
;;
stop)
echo "stopping alexa"
forever stop /usr/local/Echo/server.js
;;
status)
SERVICE='server.js'
if ps ax | grep -v grep | grep $SERVICE > /dev/null
then
echo "$SERVICE service running, everything is fine"
exit 0
else
echo "$SERVICE is not running"
exit 1
fi
;;
*)
echo "Usage: /etc/init.d/alexa {start|stop|status}"
exit 1