Artifact file(s) for Eclipse Mosquitto
- This script will by default create a plugin-jail for Eclipse Mosquitto on FreeNAS 11.2
Download plugin and install
wget -O /tmp/mosquitto.json https://raw.githubusercontent.com/tprelog/iocage-mosquitto/master/mosquitto.json
sudo iocage fetch -P dhcp=on vnet=on bpf=yes -n /tmp/mosquitto.json --branch 'master'
sudo iocage exec mosquitto ee /usr/local/etc/mosquitto/mosquitto.conf
sudo iocage exec service mosquitto restart
sudo iocage exec mosquitto mosquitto_sub -d -t /dev/test
sudo iocage exec mosquitto mosquitto_pub -d -t /dev/test -m "Hello World"
- You can also use a pkg-list quickly to create a standard-jail for Mosquitto
Download pkg-list and create a jail using it to install requirements
wget -O /tmp/pkglist.json https://raw.githubusercontent.com/tprelog/iocage-mosquitto/master/pkg-list.json
sudo iocage create -r 11.2-RELEASE boot=on dhcp=on bpf=yes vnet=on -p /tmp/pkglist.json -n mosquitto
Enable and start the service
sudo iocage exec mosquitto sysrc /etc/rc.conf mosquitto_enable="YES"
sudo iocage exec mosquitto service mosquitto start
sudo iocage list -l
+-----+-------------+------+-------+----------+-----------------+---------------------+-----+----------+
| JID | NAME | BOOT | STATE | TYPE | RELEASE | IP4 | IP6 | TEMPLATE |
+=====+=============+======+=======+==========+=================+=====================+=====+==========+
| 1 | mosquitto | on | up | pluginv2 | 11.2-RELEASE-p4 | epair0b|192.0.1.86 | - | - |
+-----+-------------+------+-------+----------+-----------------+---------------------+-----+----------+
| 2 | mosquitto_2 | on | up | jail | 11.2-RELEASE-p4 | epair0b|192.0.1.79 | - | - |
+-----+-------------+------+-------+----------+-----------------+---------------------+-----+----------+
Tested on FreeNAS-11.2-BETA3
More information about iocage plugins and iocage jails can be found in the FreeNAS guide
This script should also still work with FreeNAS 11.1