annotate rlgwebd-stop @ 195:3bdee6371c3f

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.
author John "Elwin" Edwards
date Thu, 14 Jan 2016 20:52:29 -0500
parents rlgwebd-stop.js@5483d413a45b
children a7cc38a0168d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
193
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
1 #!/usr/bin/env node
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
2
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
3 var net = require('net');
194
5483d413a45b RLGWebD: move the control socket into /var/run.
John "Elwin" Edwards
parents: 193
diff changeset
4 var sockpath = "/var/run/rlgwebd.sock";
193
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
5
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
6 var sock = net.connect(sockpath, function () {
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
7 sock.on('close', function () {
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
8 if (process.argv[2] == "debug")
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
9 console.log("Control socket closed");
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
10 });
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
11 sock.write("quit\n");
80ca029f0906 Add a script to stop RLGWebD.
John "Elwin" Edwards
parents:
diff changeset
12 });