Lines 27-41
Link Here
|
27 |
|
27 |
|
28 |
command=%%PREFIX%%/sbin/mosquitto |
28 |
command=%%PREFIX%%/sbin/mosquitto |
29 |
command_args="-c ${mosquitto_config} -d" |
29 |
command_args="-c ${mosquitto_config} -d" |
30 |
pidfile=$(grep pidfile ${mosquitto_config} | awk '{print($2)}') |
30 |
pidfile=$(grep pid_file ${mosquitto_config} | awk '{print($2)}') |
31 |
required_files=${mosquitto_config} |
31 |
required_files=${mosquitto_config} |
|
|
32 |
mosquitto_user=daemon |
32 |
|
33 |
|
33 |
extra_commands="reload" |
34 |
extra_commands="reload" |
34 |
stop_postcmd=stop_postcmd |
35 |
stop_postcmd=stop_postcmd |
|
|
36 |
start_precmd="mosquitto_precmd" |
37 |
|
35 |
stop_postcmd() |
38 |
stop_postcmd() |
36 |
{ |
39 |
{ |
37 |
rm -f $pidfile |
40 |
rm -f $pidfile |
38 |
} |
41 |
} |
39 |
|
42 |
|
|
|
43 |
mosquitto_precmd() { |
44 |
install -o ${mosquitto_user} -m 644 /dev/null ${pidfile} |
45 |
} |
46 |
|
40 |
load_rc_config $name |
47 |
load_rc_config $name |
41 |
run_rc_command "$1" |
48 |
run_rc_command "$1" |