mirror of
https://github.com/openwrt/packages.git
synced 2025-12-24 01:58:35 +04:00
recent changes in trunk allow us to specify the userid inside the openwrt makefile. the info is stored int he meta data of the IPK contorl file and users are generated by the new generic postinst trigger. Signed-off-by: John Crispin <blogic@openwrt.org>
29 lines
620 B
Bash
Executable File
29 lines
620 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
# Basic init script for mosquitto
|
|
# April 2012, OpenWrt.org
|
|
# Provides support for the luci-app-mosquitto package, if installed
|
|
|
|
START=80
|
|
APP=`which mosquitto`
|
|
USE_UCI_CONFIG=$(uci -q get mosquitto.owrt.use_uci)
|
|
if [ $? -eq 1 ]; then
|
|
USE_UCI_CONFIG=0
|
|
fi
|
|
|
|
SERVICE_DAEMONIZE=1
|
|
SERVICE_WRITE_PID=1
|
|
|
|
start() {
|
|
if [ "$USE_UCI_CONFIG" -eq 1 ]; then
|
|
CONF=/tmp/mosquitto.converted.$$.conf
|
|
mosquitto.uci.convert -f $CONF
|
|
else
|
|
CONF=/etc/mosquitto/mosquitto.conf
|
|
fi
|
|
service_start $APP -c $CONF
|
|
}
|
|
|
|
stop() {
|
|
service_stop $APP
|
|
}
|