Update 'Setup-Repo.sh'

This commit is contained in:
Bram Prieshof
2020-09-24 12:01:00 +02:00
parent ac3b6dec82
commit f90972e4fa

View File

@@ -6,8 +6,6 @@ dist_name=$(grep -oP '(?<=^VERSION_CODENAME=).+' /etc/os-release | tr -d '"')
init () {
Dist=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] ; then
$PKGI software-properties-common gnupg > $OUTPUT 2>&1
elif [ "$osrel" = "deb10" ]; then
@@ -20,8 +18,6 @@ fi
mysql () {
Dist=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] || [ "$osrel" = "deb10" ]; then
wget -qO - http://mirror.nxdi.nl/resources/mysql/RPM-GPG-KEY-mysql | apt-key add -
echo "deb http://mirror.nxdi.nl/apt/mysql/"$dist"/ "$dist_name" mysql-8.0" >/etc/apt/sources.list.d/mysql.list
@@ -64,18 +60,15 @@ if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] ; then
add-apt-repository --no-update ppa:ondrej/apache2 -y -n > $OUTPUT 2>&1
elif [ "$osrel" = "deb10" ]; then
wget -O /etc/apt/trusted.gpg.d/apache2.gpg https://packages.sury.org/apache2/apt.gpg
echo "deb https://packages.sury.org/apache2/ `lsb_release -cs` main" > /etc/apt/sources.list.d/apache2.list
echo "deb https://packages.sury.org/apache2/ "$dist_name"` main" > /etc/apt/sources.list.d/apache2.list
fi
}
nginx () {
if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] ; then
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
elif [ "$osrel" = "deb10" ]; then
echo "deb http://nginx.org/packages/debian `lsb_release -cs` nginx" > /etc/apt/sources.list.d/nginx.list
if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] || [ "$osrel" = "deb10" ] ; then
echo "deb http://nginx.org/packages/"$dist" "$dist_name" nginx" > /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
elif [ "$osrel" = "cent8" ]; then
rpm --import https://nginx.org/keys/nginx_signing.key
@@ -97,7 +90,7 @@ if [ "$osrel" = "ubu1804" ] || [ "$osrel" = "ubu2004" ] ; then
add-apt-repository --no-update ppa:ondrej/php -y -n > $OUTPUT 2>&1
elif [ "$osrel" = "deb10" ]; then
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ `lsb_release -cs` main" > /etc/apt/sources.list.d/php.list
echo "deb https://packages.sury.org/php/ "$dist_name" main" > /etc/apt/sources.list.d/php.list
fi
}