diff --git a/CMS/nextcloud/conf.sh b/CMS/nextcloud/conf.sh index 1ab8b42..ddfd6b6 100644 --- a/CMS/nextcloud/conf.sh +++ b/CMS/nextcloud/conf.sh @@ -47,7 +47,7 @@ fi #PHP 8.0 Settings if [ "$phpVerBranch" = "8x" ]; then - if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then + if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then if ! grep -Fxq "apc.enable_cli=1" /etc/php/${phpver}/mods-available/apcu.ini; then echo "apc.enable_cli=1" >> /etc/php/${phpver}/mods-available/apcu.ini fi diff --git a/CoreModules/apache/conf.sh b/CoreModules/apache/conf.sh index e6dc629..0479bd9 100644 --- a/CoreModules/apache/conf.sh +++ b/CoreModules/apache/conf.sh @@ -4,7 +4,7 @@ systemctl stop $apacheService > $OUTPUT 2>&1 # Apache # ############## -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then a2dissite 000-default > $OUTPUT 2>&1 a2dismod mpm_prefork > $OUTPUT 2>&1 a2enmod actions fcgid alias proxy_fcgi proxy_http ssl headers http2 setenvif socache_shmcb rewrite > $OUTPUT 2>&1 diff --git a/CoreModules/apache/preconf.sh b/CoreModules/apache/preconf.sh index 87a4508..441a93f 100644 --- a/CoreModules/apache/preconf.sh +++ b/CoreModules/apache/preconf.sh @@ -1,4 +1,4 @@ -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then # Debian/Ubunbtu apache variables apacheConfDir=/etc/apache2 apacheService=apache2 diff --git a/CoreModules/generic/preconf.sh b/CoreModules/generic/preconf.sh index 24fc427..10f3a35 100644 --- a/CoreModules/generic/preconf.sh +++ b/CoreModules/generic/preconf.sh @@ -1,4 +1,4 @@ -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then ######################## # Debian/Ubunbtu # ######################## diff --git a/CoreModules/nginx/conf.sh b/CoreModules/nginx/conf.sh index 4f96f79..3c8177f 100644 --- a/CoreModules/nginx/conf.sh +++ b/CoreModules/nginx/conf.sh @@ -42,7 +42,7 @@ mkdir -p /opt/toggle curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-Netdata_NGINX.sh -o /opt/toggle/toggle-Netdata.sh curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh -o /opt/toggle/toggle-PhpMyAdmin.sh ##monit toggle -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then monitconf=/etc/monit/monitrc elif [ "$shortdist" = "el8" ]; then monitconf=/etc/monitrc diff --git a/PhpUpdater.sh b/PhpUpdater.sh index d8b41a7..a44e017 100644 --- a/PhpUpdater.sh +++ b/PhpUpdater.sh @@ -6,7 +6,7 @@ source /etc/ICTM/mainvar.list if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi if [ ! -f "/etc/ICTM/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi source /etc/ICTM/phpvar.list -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ]|| [ "$shortdist" = "deb11" ] ; then apt update RepoVersion=`apt list |grep php | grep deb.sury.org| cut -f1 -d"-"| tail -1 |sed 's/php//'` elif [ "$shortdist" = "el8" ]; then @@ -55,7 +55,7 @@ if [ $IMODE = l ]; then fi #Genereating vars for new php version - if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then + if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then # Debian/Ubunbtu Php variables newphpPoolDir=/etc/php/${newphpver}/fpm/pool.d newphpPkgName=php${newphpver} diff --git a/Scripts/Compat/Compat-V2.sh b/Scripts/Compat/Compat-V2.sh index 82786a2..d4bd195 100644 --- a/Scripts/Compat/Compat-V2.sh +++ b/Scripts/Compat/Compat-V2.sh @@ -13,7 +13,8 @@ printf '%s' "Updating Web-V2..." CompatVer=$UpdaterCompatTo #Updating mod lists -aonoption="/MySQL/" +#Temporarily for Testing since not avalible#aonoption="/MySQL/" +aonoption="/MariaDB/" #Temporarily replaceing MySQL aonoption="$aonoption /Unattended-Security-Updates/" aonoption="$aonoption /Backup-Util/" aonoption="$aonoption /AcmeSH/" diff --git a/Scripts/GenerateApacheList.sh b/Scripts/GenerateApacheList.sh index 49de67f..4c5670b 100644 --- a/Scripts/GenerateApacheList.sh +++ b/Scripts/GenerateApacheList.sh @@ -2,7 +2,7 @@ if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, source /etc/ICTM/mainvar.list if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then # Debian/Ubunbtu apache variables apacheConfDir=/etc/apache2 apacheService=apache2 diff --git a/Scripts/GeneratePhplist.sh b/Scripts/GeneratePhplist.sh index e848b8e..c31b16d 100644 --- a/Scripts/GeneratePhplist.sh +++ b/Scripts/GeneratePhplist.sh @@ -2,7 +2,7 @@ if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, source /etc/ICTM/mainvar.list if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then # Debian/Ubunbtu Php variables phpPoolDir=/etc/php/${phpver}/fpm/pool.d phpPkgName=php${phpver} diff --git a/Scripts/MicroOSDetect.sh b/Scripts/MicroOSDetect.sh index c6ccf85..4ea533c 100644 --- a/Scripts/MicroOSDetect.sh +++ b/Scripts/MicroOSDetect.sh @@ -7,6 +7,8 @@ if [[ "${dist}" == *"ubuntu"* ]] && [[ "${dist_ver}" == *"18.04"* ]]; then shortdist=ubu2004 elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then shortdist=deb10 +elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"11"* ]]; then + shortdist=deb11 elif [[ "${dist}" == *"centos"* ]] && [[ "${dist_ver}" == *"8"* ]]; then shortdist=el8 else diff --git a/Scripts/SMI.sh b/Scripts/SMI.sh index 06ac178..b4ee86c 100644 --- a/Scripts/SMI.sh +++ b/Scripts/SMI.sh @@ -45,14 +45,18 @@ elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then PKGI="${PKGM} install -y --no-install-recommends" PKGLIST="apt" shortdist=deb10 +elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"11"* ]]; then + echo "Debian 11 Detected" + PKGM="$APTMODE" + PKGI="${PKGM} install -y --no-install-recommends" + PKGLIST="apt" + shortdist=deb11 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" shortdist=el8 - echo "This OS is not supported" - exit else echo "This OS is not supported" exit diff --git a/SubModules/php-fpm/preconf.sh b/SubModules/php-fpm/preconf.sh index 29ff8de..79fe42c 100644 --- a/SubModules/php-fpm/preconf.sh +++ b/SubModules/php-fpm/preconf.sh @@ -1,4 +1,4 @@ -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then # Debian/Ubunbtu Php variables phpPoolDir=/etc/php/${phpver}/fpm/pool.d phpPkgName=php${phpver} diff --git a/SubModules/postfix/conf.sh b/SubModules/postfix/conf.sh index 2d4c3b7..f0d622c 100644 --- a/SubModules/postfix/conf.sh +++ b/SubModules/postfix/conf.sh @@ -52,7 +52,7 @@ ${hostname} EOF -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then mkdir -p /var/spool/postfix/var/run/opendkim sudo chown opendkim:postfix /var/spool/postfix/var/run/opendkim sed -i "/^RUNDIR=/c\RUNDIR=/var/spool/postfix/var/run/opendkim" /etc/default/opendkim diff --git a/SubModules/postfix/preconf.sh b/SubModules/postfix/preconf.sh index fec0bd6..3c7e3bf 100644 --- a/SubModules/postfix/preconf.sh +++ b/SubModules/postfix/preconf.sh @@ -1,4 +1,4 @@ -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then debconf-set-selections <<< "postfix postfix/mailname string $hostname" debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" fi \ No newline at end of file diff --git a/SubModules/redis/preconf.sh b/SubModules/redis/preconf.sh index 8dec08d..cc761e0 100644 --- a/SubModules/redis/preconf.sh +++ b/SubModules/redis/preconf.sh @@ -1,6 +1,6 @@ #!/bin/bash -if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] ; then +if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist" = "deb10" ] || [ "$shortdist" = "deb11" ] ; then # Debian/Ubunbtu redis variables redisService=redis-server diff --git a/extModules.list b/extModules.list index f2d9b69..7fee0bf 100644 --- a/extModules.list +++ b/extModules.list @@ -1,4 +1,5 @@ https://git.ictmaatwerk.com/VPS-scripts/MySQL/raw/branch/master/ https://git.ictmaatwerk.com/VPS-scripts/Unattended-Security-Updates/raw/branch/master/ https://git.ictmaatwerk.com/VPS-scripts/Backup-Util/raw/branch/master/ -https://git.ictmaatwerk.com/VPS-scripts/AcmeSH/raw/branch/main/ \ No newline at end of file +https://git.ictmaatwerk.com/VPS-scripts/AcmeSH/raw/branch/main/ +https://git.ictmaatwerk.com/VPS-scripts/MariaDB/raw/branch/master/ \ No newline at end of file diff --git a/installer.sh b/installer.sh index e9ee770..3d8e631 100644 --- a/installer.sh +++ b/installer.sh @@ -30,7 +30,7 @@ fi #Git-repo repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2 -branch=master +branch=Debian11Testing branchtype=branch #=branch for branch and =tag for release CompatVer=2 #Installer-config @@ -64,6 +64,15 @@ elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"10"* ]]; then PKGI="${PKGM} install -y --no-install-recommends" PKGLIST="apt" shortdist=deb10 +elif [[ "${dist}" == *"debian"* ]] && [[ "${dist_ver}" == *"11"* ]]; then + PKGM="$APTMODE" + PKGUC="$PKGM update" + PKGUP="$PKGM upgrade -y" + PKGI="${PKGM} install -y --no-install-recommends" + PKGLIST="apt" + shortdist=deb11 + echo "Support for this os is stil being developed, Exiting" + exit elif [ "$(grep -oP '(?<=^PLATFORM_ID=).+' /etc/os-release | tr -d '"')" = "platform:el8" ]; then PKGM="dnf" PKGUC="$PKGM check-update --refresh" @@ -99,7 +108,8 @@ fi # Always-on modules # ##---------------------## -aonoption="/MySQL/" +#Temporarily for Testing since not avalible#aonoption="/MySQL/" +aonoption="/MariaDB/" #Temporarily replaceing MySQL aonoption="$aonoption /Unattended-Security-Updates/" aonoption="$aonoption /Backup-Util/" aonoption="$aonoption /AcmeSH/"