systemd service v1.0.0
authorChristian Weiske <cweiske@cweiske.de>
Fri, 5 May 2017 20:06:08 +0000 (22:06 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Fri, 5 May 2017 20:06:08 +0000 (22:06 +0200)
README.rst
scripts/systemd/auerswald-callnotifier.service [new file with mode: 0644]

index 2397a50..57fdb15 100644 (file)
@@ -32,6 +32,19 @@ Dependencies
 - curl for the dreambox notifier
 
 
+Systemd service
+===============
+
+1. Copy ``scripts/systemd/auerswald-callnotifier.service`` to ``/etc/systemd/system/``
+2. Adjust user and group name and callnotifier path
+3. Enable the service::
+
+    $ systemctl daemon-reload
+    $ systemctl enable auerswald-callnotifier
+    $ systemctl start auerswald-callnotifier
+    $ systemctl status auerswald-callnotifier
+
+
 =============
 Configuration
 =============
@@ -186,6 +199,6 @@ Auerswald callnotifier is licensed under the terms of the GPLv3 or later.
 ======
 Source
 ======
-Original git website: http://git.cweiske.de/?p=auerswald-callnotifier.git
+Original git website: https://git.cweiske.de/auerswald-callnotifier.git
 
 Mirror: https://github.com/cweiske/auerswald-callnotifier
diff --git a/scripts/systemd/auerswald-callnotifier.service b/scripts/systemd/auerswald-callnotifier.service
new file mode 100644 (file)
index 0000000..e2c8beb
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Auerswald Callnotifier
+After=mysql.target network.target
+
+[Service]
+Type=simple
+User=www-data
+Group=www-data
+ExecStart=/usr/local/src/auerswald-callnotifier/callnotifier.php
+Restart=always
+RestartSec=5
+
+[Install]
+WantedBy=multi-user.target