added update var and renamed packagelist
This commit is contained in:
@@ -28,7 +28,7 @@ while true; do
|
||||
done
|
||||
}
|
||||
|
||||
if [ "/etc/ICTM/mainvar.list" ] ; then
|
||||
if [ -f "/etc/ICTM/mainvar.list" ] ; then
|
||||
source /etc/ICTM/mainvar.list;
|
||||
else
|
||||
VarError mainvar "Webserver and php"
|
||||
@@ -49,7 +49,7 @@ if [ ! -z "$webserv" ]; then
|
||||
source /etc/ICTM/phpvar.list
|
||||
fi
|
||||
if [ $webserv = apache ]; then
|
||||
if [ -f "/etc/ICTM/apachevar.list" ] && ; then
|
||||
if [ -f "/etc/ICTM/apachevar.list" ] ; then
|
||||
source /etc/ICTM/apachevar.list
|
||||
else
|
||||
VarError apachevar apache
|
||||
@@ -67,24 +67,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
|
||||
@@ -118,7 +126,7 @@ echo "$1"
|
||||
##--------------------------##
|
||||
|
||||
msg " Starting installer" 8 78
|
||||
$PKGM update > $OUTPUT 2>&1
|
||||
$PKGUC > $OUTPUT 2>&1
|
||||
$PKGI curl > $OUTPUT 2>&1
|
||||
|
||||
|
||||
@@ -139,8 +147,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
|
||||
|
||||
|
||||
##-------------------##
|
||||
@@ -155,8 +163,7 @@ fi
|
||||
# Installer #
|
||||
##-------------##
|
||||
|
||||
$PKGM update
|
||||
sed -i 's/PHPver/'$phpver'/g' /tmp/pkg.list
|
||||
$PKGUC
|
||||
cat /tmp/pkg.list | xargs $PKGI
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user