Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mosquitto reload config file

I want to reload the mosquitto password file when it is changed. Is possible to send SIGHUP ("signal hang up") or some equivalent to mosquitto server on windows?

like image 766
puko Avatar asked Aug 24 '16 14:08

puko


1 Answers

It is possible to do so. First you have to set your mosquitto.conf to save the pid in a file by specifying the pid_file.

pid_file your/pid/file

Then you can call

$kill -SIGHUP $(cat your/pid/file).

Or else if you already know the PID of the mosquitoo, then you can do

$kill -SIGHUP PID

This will send sighup signal and reload the pwfile. More info can be found at mosquitto conf

like image 161
Dulaj Avatar answered Oct 04 '22 20:10

Dulaj