annotate rlgwebd.service @ 192:addc4e3456c4

Begin adding systemd compatibility. The Makefile can be used to build and install rlgwebd. On systems with systemd, the unit file controls starting and stopping the service, and the shell script is not needed. The unit file uses KillMode=none because socat does not actually stop rlgwebd, it only asks it to stop and exits without waiting for a response. Until a better stopping method is introduced, this setting prevents systemd from killing all the rlgwebd processes as soon as socat exits.
author John "Elwin" Edwards
date Fri, 01 Jan 2016 16:11:34 -0500
parents
children 80ca029f0906
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
192
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
1 [Unit]
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
2 Description=RLGWebD app daemon
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
3 After=network.target syslog.target
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
4
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
5 [Service]
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
6 Type=simple
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
7 Environment=NODE_PATH=/usr/lib/node_modules
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
8 ExecStart=/usr/bin/node /usr/local/bin/rlgwebd.js
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
9 ExecStop=/usr/bin/socat "EXEC:echo quit" /var/local/rlgwebd/ctl
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
10 KillMode=none
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
11
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
12 [Install]
addc4e3456c4 Begin adding systemd compatibility.
John "Elwin" Edwards
parents:
diff changeset
13 WantedBy=multi-user.target