summaryrefslogtreecommitdiff
path: root/pcr/mosquitto/mosquitto.service
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@parabola.nu>2013-04-29 16:39:28 -0300
committerNicolás Reynolds <fauno@parabola.nu>2013-04-29 16:39:28 -0300
commit9000b22a1aec1b5bde1777d31bd4234f86100343 (patch)
tree0aa3ee582322f513f926f3b2bcc60a4ee3ce26ea /pcr/mosquitto/mosquitto.service
parent6b7c637c12b8bbf1b2483ce378ffc475fb7a438e (diff)
Upgraded and added .service
Diffstat (limited to 'pcr/mosquitto/mosquitto.service')
-rw-r--r--pcr/mosquitto/mosquitto.service22
1 files changed, 22 insertions, 0 deletions
diff --git a/pcr/mosquitto/mosquitto.service b/pcr/mosquitto/mosquitto.service
new file mode 100644
index 000000000..7e9ef7cc8
--- /dev/null
+++ b/pcr/mosquitto/mosquitto.service
@@ -0,0 +1,22 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+
+[Unit]
+Description=Mosquitto MQTT Broker daemon
+ConditionPathExists=/etc/mosquitto/mosquitto.conf
+Requires=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d
+ExecStartPre=/bin/rm -f /var/run/mosquitto.pid
+PIDFile=/var/run/mosquitto.pid
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target
+