Mercurial > hg > rlgwebd
view initscript @ 210:b04313038a0b
Changes for compatibility with recent versions of NodeJS.
The pty.js module is replaced with node-pty, now-mandatory callbacks
are added to various fs functions, and deprecated Buffer() calls are
replaced with Buffer.from() or Buffer.alloc().
author | John "Elwin" Edwards |
---|---|
date | Sun, 25 Aug 2019 21:27:31 -0400 |
parents | 2667aaad8e08 |
children |
line wrap: on
line source
#!/bin/sh NODE_PATH=/var/local/lib/node_modules LOGFILE=/var/log/rlgwebd.log CTLSOCKET=/var/run/rlgwebd/rlgwebd.sock RLGWEBDJS=/usr/local/bin/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