diff options
Diffstat (limited to 'pcr/mosquitto/mosquitto.service')
-rw-r--r-- | pcr/mosquitto/mosquitto.service | 22 |
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 + |