#!/bin/sh DAEMON=mosquitto MODPATH=/mod/etc CONF=$MODPATH/mosquitto.conf PID_FILE=/var/run/mosquitto.pid . /etc/init.d/modlibrc config() { modlib_config } start() { modlib_startdaemon $DAEMON -c $CONF -d } case "$1" in ""|load) mkdir -p /tmp/flash/mosquitto modreg cgi 'mosquitto' 'mosquitto' modreg daemon $DAEMON modlib_start $MOSQUITTO_ENABLED ;; unload) modunreg file mosquitto modunreg daemon $DAEMON modunreg cgi mosquitto modlib_stop ;; start) modlib_start ;; stop) modlib_stop ;; restart) modlib_restart ;; status) modlib_status ;; *) echo "Usage: $0 [load|unload|start|stop|restart|reload|status]" 1>&2 exit 1 ;; esac exit 0