diff --git a/SimpleInstall.sh b/SimpleInstall.sh index d06d332..e1918fe 100644 --- a/SimpleInstall.sh +++ b/SimpleInstall.sh @@ -24,24 +24,32 @@ dist=$(grep --color=never -Po "^ID=\K.*" "/etc/os-release") if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then echo "Ubuntu 18.04 Detected" PKGM="$APTMODE" + PKGUC="$PKGM update" + PKGUP="$PKGM upgrade -y" PKGI="${PKGM} install -y --no-install-recommends" PKGLIST="apt" shortdist=ubu1804 elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then echo "Ubuntu 20.04 Detected" PKGM="$APTMODE" +PKGUC="$PKGM update" + PKGUP="$PKGM upgrade -y" PKGI="${PKGM} install -y --no-install-recommends" PKGLIST="apt" shortdist=ubu2004 elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then echo "Debian 10 Detected" PKGM="$APTMODE" + PKGUC="$PKGM update" + PKGUP="$PKGM upgrade -y" PKGI="${PKGM} install -y --no-install-recommends" PKGLIST="apt" shortdist=deb10 elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then echo "Centos 8 Detected" PKGM="dnf" + PKGUC="$PKGM check-update --refresh" + PKGUP="$PKGM update -y" PKGI="${PKGM} install --setopt=install_weak_deps=False --best -y" PKGLIST="dnf" shortdist=el8 @@ -50,6 +58,7 @@ else exit fi + unset dist_ver dist APTMODE @@ -82,7 +91,7 @@ fi ##--------------------------## msg " Starting installer" 8 78 -$PKGM update > $OUTPUT 2>&1 +$PKGUC > $OUTPUT 2>&1 $PKGI curl > $OUTPUT 2>&1 @@ -103,8 +112,8 @@ fi msg " Preconfiguring" curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash > $OUTPUT 2>&1 -$PKGM update -$PKGM upgrade -y +$PKGUC +$PKGUP ##-------------------## @@ -119,7 +128,7 @@ fi # Installer # ##-------------## -$PKGM update +$PKGUC sed -i 's/PHPver/'$phpver'/g' /tmp/pkg.list cat /tmp/pkg.list | xargs $PKGI