Systemd service changes for updated pid path.

Signed-off-by: Peter Stevenson <pete@ihut.co.uk>
This commit is contained in:
Peter Stevenson 2020-12-16 23:39:16 +00:00 committed by Peter Stevenson
parent cc47eaba09
commit 8a44e5940c
4 changed files with 6 additions and 2 deletions

View File

@ -869,7 +869,7 @@ log_timestamp_format %Y-%m-%dT%H:%M:%S
<para>If mosquitto is being automatically started by an
init script it will usually be required to write a pid
file. This should then be configured as e.g.
/var/run/mosquitto.pid</para>
/var/run/mosquitto/mosquitto.pid</para>
<para>Not reloaded on reload signal.</para>
</listitem>
</varlistentry>

View File

@ -145,7 +145,7 @@
# Write process id to a file. Default is a blank string which means
# a pid file shouldn't be written.
# This should be set to /var/run/mosquitto.pid if mosquitto is
# This should be set to /var/run/mosquitto/mosquitto.pid if mosquitto is
# being run automatically on boot with an init script and
# start-stop-daemon or similar.
#pid_file

View File

@ -12,6 +12,8 @@ ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
ExecStartPre=/bin/chown mosquitto: /var/log/mosquitto
ExecStartPre=/bin/mkdir -m 740 -p /var/run/mosquitto
ExecStartPre=/bin/chown mosquitto: /var/run/mosquitto
[Install]
WantedBy=multi-user.target

View File

@ -10,6 +10,8 @@ ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
ExecStartPre=/bin/mkdir -m 740 -p /var/log/mosquitto
ExecStartPre=/bin/chown mosquitto: /var/log/mosquitto
ExecStartPre=/bin/mkdir -m 740 -p /var/run/mosquitto
ExecStartPre=/bin/chown mosquitto: /var/run/mosquitto
[Install]
WantedBy=multi-user.target