summaryrefslogtreecommitdiffstats
path: root/main/mosquitto/mosquitto.initd
blob: fbea2ae655bc80a7f8e8c7a183149a701ec525c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/sbin/runscript

command="/usr/sbin/mosquitto"
command_args="-d $mosquitto_args"
#start_stop_daemon_args="--background --stdout /dev/null --stderr /dev/null"

config=/etc/mosquitto/${SVCNAME#mosquitto.}.conf

start_pre() {
	if [ -e $config ]; then
		pidfile=$(awk '$1 == "pid_file" {print $2}' $config)
		command_args="-c $config $command_args"
	fi
}