From 89d974c6fdb3f91b5ef93356c0f53791c89901e2 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Fri, 25 Sep 2020 10:56:01 +0200 Subject: [PATCH] Set os specific pkg lists --- installer.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/installer.sh b/installer.sh index 7cdc3be..7275277 100644 --- a/installer.sh +++ b/installer.sh @@ -40,11 +40,13 @@ if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then echo "Ubuntu 18.04 Detected" PKGM="$APTMODE" PKGI="${PKGM} install -y --no-install-recommends" + PKGLIST="apt.pkg.list" shortdist=ubu1804 elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then echo "Ubuntu 20.04 Detected" PKGM="$APTMODE" PKGI="${PKGM} install -y --no-install-recommends" + PKGLIST="apt.pkg.list" echo "This os in not supported" exit shortdist=ubu2004 @@ -52,7 +54,7 @@ elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then echo "Debian 10 Detected" PKGM="$APTMODE" PKGI="${PKGM} install -y --no-install-recommends" - PKGLIST="apt.list" + PKGLIST="apt.pkg.list" shortdist=deb10 echo "This os in not supported" exit @@ -60,7 +62,7 @@ elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then echo "Centos 8 Detected" PKGM="dnf" PKGI="${PKGM} install --setopt=install_weak_deps=False --best -y" - PKGLIST="dnf.list" + PKGLIST="dnf.pkg.list" shortdist=cent8 echo "This os in not supported" exit @@ -348,10 +350,12 @@ printf " " >>/tmp/pkg.list mkdir -p /etc/ICTM/sites echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/ICTM/mainvar.list -for storeme in PKGM PKGI OUTPUT IMODE repo branch branchtype webserv phpver sqlver PHPMyadmin email hostname; do + +for storeme in PKGM PKGI PKGLIST OUTPUT IMODE shortdist repo branch branchtype webserv email shortdist hostname; do declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list done + touch /etc/ICTM/sites/"$sitename" ##----------## @@ -529,6 +533,10 @@ if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$re source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh) fi +#Saving updated vars +for storeme in phpver sqlver PHPMyadmin; do + declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list +done ##-------------## # Installer #