fixes to the service file; + former stub /etc/init.d/plc becomes /usr/bin/plc-ctl
[myplc.git] / systemd / plc.service
diff --git a/systemd/plc.service b/systemd/plc.service
new file mode 100644 (file)
index 0000000..b06c1e4
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=PLC Service
+After=network.target
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/plc-ctl start
+RemainAfterExit=true
+ExecStop=/usr/bin/plc-ctl stop
+ExecReload=/usr/bin/plc-ctl reload
+StandardOutput=journal
+
+[Install]
+WantedBy=multi-user.target