diff rlgwebd-stop.js @ 193:80ca029f0906

Add a script to stop RLGWebD. socat is no longer needed, nor is preventing systemd from sending signals.
author John "Elwin" Edwards
date Sat, 02 Jan 2016 14:33:48 -0500
parents
children 5483d413a45b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rlgwebd-stop.js	Sat Jan 02 14:33:48 2016 -0500
@@ -0,0 +1,12 @@
+#!/usr/bin/env node
+
+var net = require('net');
+var sockpath = "/var/local/rlgwebd/ctl";
+
+var sock = net.connect(sockpath, function () {
+  sock.on('close', function () {
+    if (process.argv[2] == "debug")
+      console.log("Control socket closed");
+  });
+  sock.write("quit\n");
+});