Update mqtt_setup.sh

This commit is contained in:
tteckster 2022-01-21 15:24:55 -05:00 committed by GitHub
parent b81955e5fe
commit 0879d02759
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,14 +24,14 @@ function msg() {
} }
# Prepare container OS # Prepare container OS
msg "Setting up container OS..." msg "Setting up Container OS..."
sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen sed -i "/$LANG/ s/\(^# \)//" /etc/locale.gen
locale-gen >/dev/null locale-gen >/dev/null
apt-get -y purge openssh-{client,server} >/dev/null apt-get -y purge openssh-{client,server} >/dev/null
apt-get autoremove >/dev/null apt-get autoremove >/dev/null
# Update container OS # Update container OS
msg "Updating container OS..." msg "Updating Container OS..."
apt update &>/dev/null apt update &>/dev/null
apt-get -qqy upgrade &>/dev/null apt-get -qqy upgrade &>/dev/null
@ -39,16 +39,21 @@ apt-get -qqy upgrade &>/dev/null
msg "Installing Prerequisites..." msg "Installing Prerequisites..."
apt-get -qqy install \ apt-get -qqy install \
curl \ curl \
gnupg \
sudo &>/dev/null sudo &>/dev/null
# Installing Mosquitto MQTT broker # Installing Mosquitto MQTT broker
msg "Installing Mosquitto MQTT broker.." msg "Installing Mosquitto MQTT broker.."
sudo apt-get update >/dev/null wget http://repo.mosquitto.org/debian/mosquitto-repo.gpg.key &>/dev/null
sudo apt-get -y install mosquitto &>/dev/null apt-key add mosquitto-repo.gpg.key &>/dev/null
sudo apt-get -y install mosquitto-clients &>/dev/null cd /etc/apt/sources.list.d/
wget http://repo.mosquitto.org/debian/mosquitto-bullseye.list &>/dev/null
apt-get update >/dev/null
apt-get -y install mosquitto &>/dev/null
apt-get -y install mosquitto-clients &>/dev/null
# Customize container # Customize container
msg "Customizing container..." msg "Customizing LXC..."
rm /etc/motd # Remove message of the day after login rm /etc/motd # Remove message of the day after login
rm /etc/update-motd.d/10-uname # Remove kernel information after login rm /etc/update-motd.d/10-uname # Remove kernel information after login
touch ~/.hushlogin # Remove 'Last login: ' and mail notification after login touch ~/.hushlogin # Remove 'Last login: ' and mail notification after login