#!/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
}