xoxys.mosquitto/templates/etc/systemd/system/mosquitto.service.j2
2017-12-16 23:42:31 +01:00

20 lines
445 B
Django/Jinja

## {{ ansible_managed }}
[Unit]
Description=Mosquitto MQTT Broker daemon
ConditionPathExists=/etc/mosquitto/mosquitto.conf
After=network.target
Requires=network.target
[Service]
Type=forking
RemainAfterExit=no
StartLimitInterval=0
PIDFile={{ mosquitto_pid_file }}
ExecStart=/bin/sh -c "/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d"
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=2
[Install]
WantedBy=multi-user.target