comparison initscript @ 195:3bdee6371c3f

Change various filenames. The shell script previously used to launch the daemon is now called "initscript". The script files have had the ".js" extension removed from their names.
author John "Elwin" Edwards
date Thu, 14 Jan 2016 20:52:29 -0500
parents rlgwebd@5483d413a45b
children 298a531776d6
comparison
equal deleted inserted replaced
194:5483d413a45b 195:3bdee6371c3f
1 #!/bin/sh
2
3 NODE_PATH=/usr/lib/node_modules
4 LOGFILE=/var/log/rlgwebd.log
5 CTLSOCKET=/var/run/rlgwebd.sock
6 RLGWEBDJS=./rlgwebd
7
8 export NODE_PATH
9
10 if [ $UID != 0 ]
11 then
12 echo "$0 needs to run as root." >&2
13 exit 1
14 fi
15
16 if [ $# -gt 0 ] && [ $1 = stop ]
17 then
18 socat "EXEC:echo quit" "$CTLSOCKET"
19 else
20 # Start
21 setsid node "$RLGWEBDJS" </dev/null &>>$LOGFILE &
22 fi
23
24 exit
25