diff --git a/net/mosquitto/Makefile b/net/mosquitto/Makefile index a98109f9c046..3eb41683cd24 100644 --- a/net/mosquitto/Makefile +++ b/net/mosquitto/Makefile @@ -2,7 +2,7 @@ PORTNAME= mosquitto PORTVERSION= 2.0.10 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= https://mosquitto.org/files/source/ diff --git a/net/mosquitto/files/mosquitto.in b/net/mosquitto/files/mosquitto.in index ae1bd703ecbc..6739272ff147 100644 --- a/net/mosquitto/files/mosquitto.in +++ b/net/mosquitto/files/mosquitto.in @@ -19,6 +19,8 @@ name=mosquitto rcvar=mosquitto_enable +load_rc_config $name + mosquitto_enable=${mosquitto_enable:="NO"} mosquitto_config=${mosquitto_config:="%%PREFIX%%/etc/mosquitto/mosquitto.conf"} mosquitto_user=${mosquitto_user:="nobody"} @@ -28,17 +30,8 @@ command_args="-c ${mosquitto_config} -d" pidfile=${mosquitto_pidfile:-"/var/run/mosquitto.pid"} required_files=${mosquitto_config} -extra_commands="reload" -stop_postcmd=stop_postcmd -stop_postcmd() -{ - rm -f $pidfile -} -start_precmd=start_precmd -start_precmd() -{ - install -o ${mosquitto_user} -m 644 /dev/null ${pidfile} -} +extra_commands=reload +stop_postcmd="rm -f $pidfile" +start_precmd="install -o ${mosquitto_user} -m 644 /dev/null ${pidfile}" -load_rc_config $name run_rc_command "$1"