Set os specific pkg lists

This commit is contained in:
2020-09-25 10:56:01 +02:00
parent a4815095b7
commit 89d974c6fd

View File

@@ -40,11 +40,13 @@ if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then
echo "Ubuntu 18.04 Detected" echo "Ubuntu 18.04 Detected"
PKGM="$APTMODE" PKGM="$APTMODE"
PKGI="${PKGM} install -y --no-install-recommends" PKGI="${PKGM} install -y --no-install-recommends"
PKGLIST="apt.pkg.list"
shortdist=ubu1804 shortdist=ubu1804
elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then elif [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"20.04"* ]]; then
echo "Ubuntu 20.04 Detected" echo "Ubuntu 20.04 Detected"
PKGM="$APTMODE" PKGM="$APTMODE"
PKGI="${PKGM} install -y --no-install-recommends" PKGI="${PKGM} install -y --no-install-recommends"
PKGLIST="apt.pkg.list"
echo "This os in not supported" echo "This os in not supported"
exit exit
shortdist=ubu2004 shortdist=ubu2004
@@ -52,7 +54,7 @@ elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then
echo "Debian 10 Detected" echo "Debian 10 Detected"
PKGM="$APTMODE" PKGM="$APTMODE"
PKGI="${PKGM} install -y --no-install-recommends" PKGI="${PKGM} install -y --no-install-recommends"
PKGLIST="apt.list" PKGLIST="apt.pkg.list"
shortdist=deb10 shortdist=deb10
echo "This os in not supported" echo "This os in not supported"
exit exit
@@ -60,7 +62,7 @@ elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then
echo "Centos 8 Detected" echo "Centos 8 Detected"
PKGM="dnf" PKGM="dnf"
PKGI="${PKGM} install --setopt=install_weak_deps=False --best -y" PKGI="${PKGM} install --setopt=install_weak_deps=False --best -y"
PKGLIST="dnf.list" PKGLIST="dnf.pkg.list"
shortdist=cent8 shortdist=cent8
echo "This os in not supported" echo "This os in not supported"
exit exit
@@ -348,10 +350,12 @@ printf " " >>/tmp/pkg.list
mkdir -p /etc/ICTM/sites mkdir -p /etc/ICTM/sites
echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/ICTM/mainvar.list 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 declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
done done
touch /etc/ICTM/sites/"$sitename" 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) source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/"$CMS"/"$webserv"-preconf.sh)
fi fi
#Saving updated vars
for storeme in phpver sqlver PHPMyadmin; do
declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list
done
##-------------## ##-------------##
# Installer # # Installer #