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

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
}