mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
mosquitto: use mirrored files/ tree
Instead of manually copying files and renaming on install, use the nice clean "files/<mirror>" structure and just $(CP) them into place. Signed-off-by: Karl Palsson <karlp@etactica.com>
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/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
|
||||
}
|
||||
Reference in New Issue
Block a user