xoxys.mosquitto/templates/etc/systemd/system/mosquitto.service.j2
2017-12-16 22:16:35 +01:00

22 lines
498 B
Django/Jinja

## {{ ansible_managed }}
[Unit]
Description=Mosquitto MQTT Broker daemon
ConditionPathExists=/etc/mosquitto/mosquitto.conf
After=network.target
Requires=network.target
[Service]
User={{ mosquitto_user }}
Group={{ mosquitto_user }}
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