7fa0a3500a
Use the service helper scripts to build a simple init script for the mosquitto broker. To make sure that the standard shipped config file works, add a mosquitto user if not found. Signed-off-by: Karl Palsson <karlp@remake.is> git-svn-id: svn://svn.openwrt.org/openwrt/packages@31376 3c298f89-4303-0410-b956-a3cf2f4a3e73
19 lines
329 B
Bash
Executable File
19 lines
329 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# Basic init script for mosquitto
|
|
# April 2012, OpenWrt.org
|
|
|
|
START=80
|
|
APP=`which mosquitto`
|
|
|
|
SERVICE_DAEMONIZE=1
|
|
SERVICE_WRITE_PID=1
|
|
|
|
start() {
|
|
user_exists mosquitto 200 || user_add mosquitto 200
|
|
service_start $APP -c /etc/mosquitto/mosquitto.conf
|
|
}
|
|
|
|
stop() {
|
|
service_stop $APP
|
|
}
|