From 39ea72b18662c3b977af5c0c4ef428b4475cfb21 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Thu, 3 Mar 2016 13:41:49 +0000 Subject: mosquitto: use mirrored files/ tree Instead of manually copying files and renaming on install, use the nice clean "files/" structure and just $(CP) them into place. Signed-off-by: Karl Palsson --- net/mosquitto/files/etc/init.d/mosquitto | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 net/mosquitto/files/etc/init.d/mosquitto (limited to 'net/mosquitto/files/etc/init.d') diff --git a/net/mosquitto/files/etc/init.d/mosquitto b/net/mosquitto/files/etc/init.d/mosquitto new file mode 100755 index 000000000..2b3a93a7f --- /dev/null +++ b/net/mosquitto/files/etc/init.d/mosquitto @@ -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 +} -- cgit v1.2.3