Files
Misc-Scripts/install-webmin.sh

46 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
# Webmin Install Script
if type apt &>/dev/null; then
rm -f /etc/apt/sources.list.d/webmin.list
echo -e "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
cd /tmp
wget -O- http://www.webmin.com/jcameron-key.asc | apt-key add -
apt update
apt -y install apt-transport-https
apt -y install webmin
elif type apt-get &>/dev/null; then
rm -f /etc/apt/sources.list.d/webmin.list
# echo -e "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
# cd /tmp
# wget -O- http://www.webmin.com/jcameron-key.asc | apt-key add -
bash <(curl -sL https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh)
apt -y install webmin
elif type yum &>/dev/null; then
rm -f /etc/yum.repos.d/webmin.repo
cat << EOF > /etc/yum.repos.d/webmin.repo
[Webmin]
name=Webmin Distribution Neutral
#baseurl=https://download.webmin.com/download/yum
mirrorlist=https://download.webmin.com/download/yum/mirrorlist
enabled=1
EOF
cd /tmp
wget http://www.webmin.com/jcameron-key.asc
rpm --import jcameron-key.asc
## Fedora 27/26/25/24 ##
dnf -y install webmin
## CentOS/RHEL 7.4 ##
yum -y install webmin
else
echo "Unknown System Install Type"
exit 1
fi
exit 0