Skip to content

Commit

Permalink
Systemd service changes for updated pid path.
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Stevenson <[email protected]>
  • Loading branch information
peterchs authored and Peter Stevenson committed Dec 17, 2020
1 parent cc47eab commit 8a44e59
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion man/mosquitto.conf.5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion mosquitto.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions service/systemd/mosquitto.service.notify
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions service/systemd/mosquitto.service.simple
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8a44e59

Please sign in to comment.