Skip to content

Instantly share code, notes, and snippets.

@lennysh
Last active January 12, 2017 18:00
Show Gist options
  • Save lennysh/c4c90f47ab1d4fd8d19c9eb2261b1e3d to your computer and use it in GitHub Desktop.
Save lennysh/c4c90f47ab1d4fd8d19c9eb2261b1e3d to your computer and use it in GitHub Desktop.
#!/bin/bash
# Webmin Install
. /etc/lsb-release
#DISTRIB_ID=Ubuntu
#DISTRIB_RELEASE=12.04
#DISTRIB_CODENAME=precise
#DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"
OS=$DISTRIB_ID
VER=$DISTRIB_RELEASE
DESC=$DISTRIB_DESCRIPTION
#echo $OS
#echo $VER
#echo $DESC
if [ "$OS" != "Ubuntu" ]; then
echo "This version of $DESC is not supported."
exit 1
fi
# Update Package List to Include Webmin
echo ‘############################’
echo ‘ Update Package List to Include Webmin ‘
echo ‘############################’
echo deb http://download.webmin.com/download/repository sarge contrib | sudo tee -a /etc/apt/sources.list
echo deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib | sudo tee -a /etc/apt/sources.list
# Install GPG Key
echo ‘############’
echo ‘ Install GPG Key ‘
echo ‘############’
wget http://www.webmin.com/jcameron-key.asc -O - | apt-key add -
# Update Package List
echo ‘############’
echo ‘ Updating Package List ‘
echo ‘############’
apt-get update
# Download and Install Webmin
echo ‘############’
echo ‘ Installing Webmin ‘
echo ‘############’
apt-get install -y webmin
# Allow access via UFW
echo ‘############’
echo ‘ Adding Firewall Rule ‘
echo ‘############’
ufw allow 10000
echo ‘ Webmin Installation Complete ’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment