rlgwebd/rlgwebd-stop.js
John "Elwin" Edwards ff0814c7ac 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.
2016-01-14 19:10:46 -05:00

12 lines
282 B
JavaScript
Executable file

#!/usr/bin/env node
var net = require('net');
var sockpath = "/var/run/rlgwebd.sock";
var sock = net.connect(sockpath, function () {
sock.on('close', function () {
if (process.argv[2] == "debug")
console.log("Control socket closed");
});
sock.write("quit\n");
});