44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 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
|
|
cd /tmp
|
|
curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
|
|
bash setup-repos.sh
|
|
apt install --install-recommends webmin -y
|
|
|
|
|
|
elif type apt-get &>/dev/null; then
|
|
rm -f /etc/apt/sources.list.d/webmin.list
|
|
cd /tmp
|
|
curl -o setup-repos.sh https://raw.githubusercontent.com/webmin/webmin/master/setup-repos.sh
|
|
bash setup-repos.sh
|
|
apt-get install --install-recommends webmin -y
|
|
|
|
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 |