Browse Source

Update mqtt-install.sh

create `/etc/mosquitto/conf.d/default.conf`
tteckster 1 year ago
parent
commit
f796767e06
1 changed files with 6 additions and 0 deletions
  1. 6 0
      install/mqtt-install.sh

+ 6 - 0
install/mqtt-install.sh

@@ -22,6 +22,12 @@ msg_ok "Installed Dependencies"
 msg_info "Installing Mosquitto MQTT Broker"
 msg_info "Installing Mosquitto MQTT Broker"
 $STD apt-get -y install mosquitto
 $STD apt-get -y install mosquitto
 $STD apt-get -y install mosquitto-clients
 $STD apt-get -y install mosquitto-clients
+cat <<EOF >/etc/mosquitto/conf.d/default.conf
+allow_anonymous false
+persistence true
+password_file /etc/mosquitto/passwd
+listener 1883
+EOF
 msg_ok "Installed Mosquitto MQTT Broker"
 msg_ok "Installed Mosquitto MQTT Broker"
 
 
 motd_ssh
 motd_ssh