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.
This commit is contained in:
John "Elwin" Edwards 2016-01-14 20:52:29 -05:00
parent ff0814c7ac
commit 6457f18b36
7 changed files with 1264 additions and 1264 deletions

View file

@ -19,6 +19,6 @@ install: all
mkdir -p ${CHROOT}/bin
cp sqlickrypt dglwatcher ${CHROOT}/bin
for LIB in `ldd ./sqlickrypt | awk '$$1 ~ "^/" {print $$1}; $$3 ~ "^/" {print $$3}'`; do mkdir -p ${CHROOT}`dirname $$LIB`; cp $$LIB ${CHROOT}$$LIB; done
cp rlgwebd.js rlgwebd-stop.js ${BINDIR}
cp rlgwebd rlgwebd-stop ${BINDIR}
cp ${WEBASSETS} ${CHROOT}/var/www
cp rlgwebd.service /usr/lib/systemd/system

25
initscript Normal file
View file

@ -0,0 +1,25 @@
#!/bin/sh
NODE_PATH=/usr/lib/node_modules
LOGFILE=/var/log/rlgwebd.log
CTLSOCKET=/var/run/rlgwebd.sock
RLGWEBDJS=./rlgwebd
export NODE_PATH
if [ $UID != 0 ]
then
echo "$0 needs to run as root." >&2
exit 1
fi
if [ $# -gt 0 ] && [ $1 = stop ]
then
socat "EXEC:echo quit" "$CTLSOCKET"
else
# Start
setsid node "$RLGWEBDJS" </dev/null &>>$LOGFILE &
fi
exit

1255
rlgwebd

File diff suppressed because it is too large Load diff

1242
rlgwebd.js

File diff suppressed because it is too large Load diff

View file

@ -5,8 +5,8 @@ After=network.target syslog.target
[Service]
Type=simple
Environment=NODE_PATH=/usr/lib/node_modules
ExecStart=/usr/bin/node /usr/local/bin/rlgwebd.js
ExecStop=/usr/bin/node /usr/local/bin/rlgwebd-stop.js
ExecStart=/usr/local/bin/rlgwebd
ExecStop=/usr/local/bin/rlgwebd-stop
[Install]
WantedBy=multi-user.target

View file