CUB-231: Mosquitto MQTT broker setup on Pi Zero 2 W hub
- Install script for Mosquitto MQTT broker on Pi Zero 2 W (10.60.1.101) - Persistence enabled with data stored in /var/lib/mosquitto/data/ - Topic ACL configuration for hub, sensor, mobile, and admin users - systemd service with security hardening (NoNewPrivileges, ProtectSystem) - Configuration files: mosquitto.conf, acl.conf - Validation script to verify setup before deployment
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=Mosquitto MQTT Broker
|
||||
Documentation=man:mosquitto(8)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/conf.d/mosquitto.conf
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=mosquitto
|
||||
|
||||
# Resource limits
|
||||
LimitNOFILE=65535
|
||||
|
||||
# Security hardening
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/log/mosquitto /var/lib/mosquitto /etc/mosquitto
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user