mqtt-install.sh 936 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env bash
  2. # Copyright (c) 2021-2023 tteck
  3. # Author: tteck (tteckster)
  4. # License: MIT
  5. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  6. source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
  7. color
  8. verb_ip6
  9. catch_errors
  10. setting_up_container
  11. network_check
  12. update_os
  13. msg_info "Installing Dependencies"
  14. $STD apt-get install -y curl
  15. $STD apt-get install -y sudo
  16. $STD apt-get install -y mc
  17. $STD apt-get install -y gnupg
  18. msg_ok "Installed Dependencies"
  19. msg_info "Installing Mosquitto MQTT Broker"
  20. $STD wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key
  21. $STD apt-key add mosquitto-repo.gpg.key
  22. cd /etc/apt/sources.list.d/
  23. $STD wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list
  24. $STD apt-get update
  25. $STD apt-get -y install mosquitto
  26. $STD apt-get -y install mosquitto-clients
  27. msg_ok "Installed Mosquitto MQTT Broker"
  28. motd_ssh
  29. root
  30. msg_info "Cleaning up"
  31. $STD apt-get autoremove
  32. $STD apt-get autoclean
  33. msg_ok "Cleaned"