(nb4 because wip is nb4) Eclipse Mosquitto is an open source (EPL/EDL licensed) message broker that implements the MQTT protocol versions 3.1 and 3.1.1 MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. This makes it suitable for "Internet of Things" messaging such as with low power sensors or mobile devices such as phones, embedded computers or microcontrollers like the Arduino.
30 lines
533 B
Bash
30 lines
533 B
Bash
#!@RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: mosquitto.sh,v 1.1 2019/07/20 23:09:27 gdt Exp $
|
|
#
|
|
# PROVIDE: mosquitto
|
|
# REQUIRE: DAEMON
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="mosquitto"
|
|
rcvar=$name
|
|
command="@PREFIX@/sbin/${name}"
|
|
piddir="/var/run/${name}"
|
|
pidfile="${piddir}/${name}.pid"
|
|
config="@PKG_SYSCONFDIR@/${name}.conf"
|
|
|
|
command_args="-d -c $config"
|
|
|
|
start_precmd="mosquitto_precmd"
|
|
test_cmd="mosquitto_test"
|
|
extra_commands=""
|
|
|
|
mosquitto_precmd()
|
|
{
|
|
mkdir -p ${piddir}
|
|
chown @MOSQUITTO_USER@ ${piddir}
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|