changeset 194:5483d413a45b

RLGWebD: move the control socket into /var/run. This is a more standard location. /run is preferred by systemd, but portability to non-systemd systems is important.
author John "Elwin" Edwards
date Thu, 14 Jan 2016 19:10:46 -0500
parents 80ca029f0906
children 3bdee6371c3f
files Makefile rlgwebd rlgwebd-stop.js rlgwebd.js
diffstat 4 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Sat Jan 02 14:33:48 2016 -0500
+++ b/Makefile	Thu Jan 14 19:10:46 2016 -0500
@@ -20,6 +20,5 @@
 	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}
-	mkdir -p /var/local/rlgwebd
 	cp ${WEBASSETS} ${CHROOT}/var/www
 	cp rlgwebd.service /usr/lib/systemd/system
--- a/rlgwebd	Sat Jan 02 14:33:48 2016 -0500
+++ b/rlgwebd	Thu Jan 14 19:10:46 2016 -0500
@@ -2,7 +2,7 @@
 
 NODE_PATH=/usr/lib/node_modules
 LOGFILE=/var/local/rlgwebd/log
-CTLSOCKET=/var/local/rlgwebd/ctl
+CTLSOCKET=/var/run/rlgwebd.sock
 RLGWEBDJS=./rlgwebd.js
 
 export NODE_PATH
--- a/rlgwebd-stop.js	Sat Jan 02 14:33:48 2016 -0500
+++ b/rlgwebd-stop.js	Thu Jan 14 19:10:46 2016 -0500
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 
 var net = require('net');
-var sockpath = "/var/local/rlgwebd/ctl";
+var sockpath = "/var/run/rlgwebd.sock";
 
 var sock = net.connect(sockpath, function () {
   sock.on('close', function () {
--- a/rlgwebd.js	Sat Jan 02 14:33:48 2016 -0500
+++ b/rlgwebd.js	Thu Jan 14 19:10:46 2016 -0500
@@ -14,7 +14,7 @@
 
 /* Configuration variables */
 // The first file is NOT in the chroot.
-var ctlsocket = "/var/local/rlgwebd/ctl";
+var ctlsocket = "/var/run/rlgwebd.sock";
 var httpPort = 8080;
 var chrootDir = "/var/dgl/";
 var dropToUser = "rodney";