diff options
Diffstat (limited to 'app-misc/mosquitto/files')
4 files changed, 91 insertions, 0 deletions
diff --git a/app-misc/mosquitto/files/mosquitto b/app-misc/mosquitto/files/mosquitto new file mode 100644 index 000000000000..e70a6ab01b3d --- /dev/null +++ b/app-misc/mosquitto/files/mosquitto @@ -0,0 +1,24 @@ +#!/sbin/openrc-run + +depend() { + need net +} + +checkconfig() { + if [ ! -f /etc/${SVCNAME}/${SVCNAME}.conf ] ; then + eerror "No /etc/${SVCNAME}/${SVCNAME}.conf file exists!" + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting ${SVCNAME}" + start-stop-daemon --start --exec /usr/sbin/${SVCNAME} --background --make-pidfile --pidfile /var/run/${SVCNAME}.pid -- --config-file /etc/${SVCNAME}/${SVCNAME}.conf + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --exec /usr/sbin/${SVCNAME} --pidfile /var/run/${SVCNAME}.pid + eend $? +} diff --git a/app-misc/mosquitto/files/mosquitto-1.4.10-conditional-tests.patch b/app-misc/mosquitto/files/mosquitto-1.4.10-conditional-tests.patch new file mode 100644 index 000000000000..12b4fc56bc3c --- /dev/null +++ b/app-misc/mosquitto/files/mosquitto-1.4.10-conditional-tests.patch @@ -0,0 +1,43 @@ +--- a/test/broker/Makefile 2016-06-02 22:20:22.000000000 +0100 ++++ b/test/broker/Makefile 2016-07-08 14:17:33.772666865 +0100 +@@ -63,6 +63,7 @@ + ./05-clean-session-qos1.py + + 06 : ++ifeq ($(WITH_BRIDGE),yes) + ./06-bridge-reconnect-local-out.py + ./06-bridge-br2b-disconnect-qos1.py + ./06-bridge-br2b-disconnect-qos2.py +@@ -70,6 +71,7 @@ + ./06-bridge-b2br-disconnect-qos2.py + ./06-bridge-fail-persist-resend-qos1.py + ./06-bridge-fail-persist-resend-qos2.py ++endif + + 07 : + ./07-will-qos0.py +@@ -87,10 +89,12 @@ + ./08-ssl-connect-cert-auth-crl.py + ./08-ssl-connect-identity.py + ./08-ssl-connect-no-identity.py ++ifeq ($(WITH_BRIDGE),yes) + ./08-ssl-bridge.py + ./08-tls-psk-pub.py + ./08-tls-psk-bridge.py + endif ++endif + + 09 : + ./09-plugin-auth-unpwd-success.py +--- a/test/broker/c/Makefile 2016-02-14 14:36:55.000000000 +0000 ++++ b/test/broker/c/Makefile 2016-05-05 09:40:31.440608209 +0100 +@@ -13,7 +13,9 @@ + $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1 + + 08-tls-psk-bridge.test : 08-tls-psk-bridge.c ++ifeq ($(WITH_BRIDGE),yes) + $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1 ++endif + + + reallyclean : clean diff --git a/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch b/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch new file mode 100644 index 000000000000..1642597c5620 --- /dev/null +++ b/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch @@ -0,0 +1,12 @@ +--- a/test/broker/c/Makefile 2016-02-14 14:36:55.000000000 +0000 ++++ b/test/broker/c/Makefile 2016-05-05 09:40:31.440608209 +0100 +@@ -13,7 +13,9 @@ + $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1 + + 08-tls-psk-bridge.test : 08-tls-psk-bridge.c ++ifeq ($(WITH_BRIDGE),yes) + $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1 ++endif + + + reallyclean : clean diff --git a/app-misc/mosquitto/files/mosquitto.service b/app-misc/mosquitto/files/mosquitto.service new file mode 100644 index 000000000000..ebdc28e3448a --- /dev/null +++ b/app-misc/mosquitto/files/mosquitto.service @@ -0,0 +1,12 @@ +[Unit] +Description=Mosquitto MQTT Broker daemon +ConditionPathExists=/etc/mosquitto/mosquitto.conf +Requires=network.target + +[Service] +Type=simple +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf +Restart=always + +[Install] +WantedBy=multi-user.target |