diff --git a/debian/mosquitto.init b/debian/mosquitto.init index 5613d19f..210bcce5 100755 --- a/debian/mosquitto.init +++ b/debian/mosquitto.init @@ -22,6 +22,7 @@ set -e PIDFILE=/var/run/mosquitto.pid DAEMON=/usr/sbin/mosquitto +CONFIG=/etc/mosquitto/mosquitto.conf # /etc/init.d/mosquitto: start and stop the mosquitto MQTT message broker @@ -44,7 +45,7 @@ case "$1" in exit 1 fi log_daemon_msg "Starting network daemon:" "mosquitto" - if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c /etc/mosquitto/mosquitto.conf ; then + if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c ${CONFIG} ; then log_end_msg 0 else log_end_msg 1 @@ -84,7 +85,7 @@ case "$1" in if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then rm -f ${PIDFILE} fi - if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c /etc/mosquitto/mosquitto.conf ; then + if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c ${CONFIG} ; then log_end_msg 0 else log_end_msg 1 @@ -104,7 +105,7 @@ case "$1" in 0) # old daemon stopped rm -f ${PIDFILE} - if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c /etc/mosquitto/mosquitto.conf ; then + if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c ${CONFIG} ; then log_end_msg 0 else log_end_msg 1