From 6922ea61b22fd95da115117b9d21347bbb9f9166 Mon Sep 17 00:00:00 2001 From: Bram Prieshof Date: Sun, 2 Jul 2023 20:43:33 +0200 Subject: [PATCH] Update references to new git location Changed Web-V2 config location to /etc/WebV2 --- AppendCMS.sh | 22 ++++++------- AppendModule.sh | 16 ++++----- CMS/wordpress/wordpress-init.sh | 4 +-- CoreModules/apache/conf.sh | 2 +- CoreModules/apache/phpupdate-handeler.sh | 4 +-- CoreModules/apache/preconf.sh | 4 +-- CoreModules/generic/preconf.sh | 8 ++--- CoreModules/nginx/conf.sh | 2 +- CoreModules/nginx/preconf.sh | 2 +- CoreModules/nginx_nonphp/conf.sh | 2 +- CoreModules/nginx_nonphp/preconf.sh | 2 +- Docs/Readme.md | 2 +- Docs/docs/Dev-Adding-Modules.md | 2 +- Docs/docs/User-MainInfo.md | 12 +++---- Docs/mkdocs.yml | 2 +- PhpUpdater.sh | 20 ++++++------ README.md | 15 ++++----- Scripts/Compat/Compat-V2.sh | 8 ++--- Scripts/EnableSSL.sh | 6 ++-- Scripts/GenerateApacheList.sh | 6 ++-- Scripts/GeneratePhplist.sh | 6 ++-- Scripts/Php-EnableSessionsToRam.sh | 6 ++-- Scripts/SMI.sh | 6 ++-- Scripts/toggles/toggle-Monit_APACHE.sh | 12 +++---- Scripts/toggles/toggle-Monit_NGINX.sh | 12 +++---- Scripts/toggles/toggle-Netdata_NGINX.sh | 12 +++---- Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh | 12 +++---- Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh | 12 +++---- SubModules/php-fpm/preconf.sh | 2 +- SubModules/postfix/Postfix-EnableSSL.sh | 4 +-- SubModules/postfix/conf.sh | 2 +- SubModules/redis/preconf.sh | 2 +- extModules.list | 9 +++--- installer.sh | 36 ++++++++++----------- 34 files changed, 136 insertions(+), 138 deletions(-) diff --git a/AppendCMS.sh b/AppendCMS.sh index 620229d..32a8818 100644 --- a/AppendCMS.sh +++ b/AppendCMS.sh @@ -12,26 +12,26 @@ ScriptCompat=2 # Fetching Vars # ##-----------------## -if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi +if [ ! -f "/etc/WebV2/selopts.list" ] || [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi -source /etc/ICTM/selopts.list -source /etc/ICTM/mainvar.list +source /etc/WebV2/selopts.list +source /etc/WebV2/mainvar.list if [ -z ${CompatVer} ] || [ "$CompatVer" -lt "$ScriptCompat" ]; then echo "Web-V2 is outdated, Please run the Compat-V*.sh updater from the repo, Current version= $CompatVer" && exit ; fi if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi if [ $webserv != nginx_nonphp ]; then - 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 [ ! -f "/etc/WebV2/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi + source /etc/WebV2/phpvar.list fi if [ $webserv = apache ]; then - if [ ! -f "/etc/ICTM/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi - source /etc/ICTM/apachevar.list + if [ ! -f "/etc/WebV2/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi + source /etc/WebV2/apachevar.list fi rm /tmp/pkg.list > $OUTPUT 2>&1 source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list) #SiteCount -if [ ! -f "/etc/ICTM/sites.count" ]; then SiteCount=`expr $(ls -l /var/www | grep -c ^d) - 1` ; else source /etc/ICTM/sites.count; fi +if [ ! -f "/etc/WebV2/sites.count" ]; then SiteCount=`expr $(ls -l /var/www | grep -c ^d) - 1` ; else source /etc/WebV2/sites.count; fi if [ -z ${SiteCount+x} ] ; then SiteCount=`expr $(ls -l /var/www | grep -c ^d) - 1` ; fi SiteCount=$(($SiteCount+1)) @@ -178,8 +178,8 @@ CMS="${CMS//:}" && CMS="${CMS,,}" # Storeing vars # ##-----------------## -touch /etc/ICTM/sites/"$sitename" -echo "SiteCount=$SiteCount" > /etc/ICTM/sites.count +touch /etc/WebV2/sites/"$sitename" +echo "SiteCount=$SiteCount" > /etc/WebV2/sites.count ##-----------## @@ -279,7 +279,7 @@ msg " Setting up SSL" then site_ext="ssl" mkdir -p /etc/acmesh/inst/$domain - /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/ICTM/SslServices)' + /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/WebV2/SslServices)' else site_ext="nossl" rm -rf /etc/acmesh/certs/$domain* diff --git a/AppendModule.sh b/AppendModule.sh index 411056f..8b449e4 100644 --- a/AppendModule.sh +++ b/AppendModule.sh @@ -12,20 +12,20 @@ ScriptCompat=2 # Fetching Vars # ##-----------------## -if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi +if [ ! -f "/etc/WebV2/selopts.list" ] || [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi -source /etc/ICTM/selopts.list -source /etc/ICTM/mainvar.list +source /etc/WebV2/selopts.list +source /etc/WebV2/mainvar.list if [ -z ${CompatVer} ] || [ "$CompatVer" -lt "$ScriptCompat" ]; then echo "Web-V2 is outdated, Please run the Compat-V*.sh updater from the repo, Current version= $CompatVer" && exit ; fi if [ -z $shortdist ] ; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/MicroOSDetect.sh) ; fi if [ $webserv != nginx_nonphp ]; then - 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 [ ! -f "/etc/WebV2/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi + source /etc/WebV2/phpvar.list fi if [ $webserv = apache ]; then - if [ ! -f "/etc/ICTM/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi - source /etc/ICTM/apachevar.list + if [ ! -f "/etc/WebV2/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi + source /etc/WebV2/apachevar.list fi rm /tmp/pkg.list source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/ModulesMenu.list) @@ -151,7 +151,7 @@ done option="${option%"${option##*[![:space:]]}"}" fi -echo 'SelectedOptions+=('$option')' >> /etc/ICTM/selopts.list +echo 'SelectedOptions+=('$option')' >> /etc/WebV2/selopts.list #Cleaning options from menu diff --git a/CMS/wordpress/wordpress-init.sh b/CMS/wordpress/wordpress-init.sh index 291d75f..f81e431 100644 --- a/CMS/wordpress/wordpress-init.sh +++ b/CMS/wordpress/wordpress-init.sh @@ -2,10 +2,10 @@ sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html core update sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html theme update --all sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html plugin install wp-fail2ban --activate sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html plugin install all-in-one-wp-migration --activate -sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html plugin install https://git.ictmaatwerk.com/downloads/wp/migrate.zip --activate +#sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html plugin install https://mirror.lan/downloads/wp/migrate.zip --activate sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html cron event run wp_update_plugins sudo -u SITEname /usr/local/bin/wp --path=/var/www/DOMAINname/html plugin update --all -echo -e "\e[96m Please update all-in-one-wp-migration-unlimited plugin manually\e[39m" +#echo -e "\e[96m Please update all-in-one-wp-migration-unlimited plugin manually\e[39m" sn2=SITEname rm -f /etc/update-motd.d/51-wpnotice-${sn2//_} diff --git a/CoreModules/apache/conf.sh b/CoreModules/apache/conf.sh index 0479bd9..40edf99 100644 --- a/CoreModules/apache/conf.sh +++ b/CoreModules/apache/conf.sh @@ -70,7 +70,7 @@ unset monitconf echo "$webserv is functioning normally" > /var/www/html/index.html #Add Apache as SSL service -echo "$apacheService" >> /etc/ICTM/SslServices +echo "$apacheService" >> /etc/WebV2/SslServices systemctl start $apacheService > $OUTPUT 2>&1 systemctl enable $apacheService > $OUTPUT 2>&1 \ No newline at end of file diff --git a/CoreModules/apache/phpupdate-handeler.sh b/CoreModules/apache/phpupdate-handeler.sh index f71fee5..e20a75d 100644 --- a/CoreModules/apache/phpupdate-handeler.sh +++ b/CoreModules/apache/phpupdate-handeler.sh @@ -1,5 +1,5 @@ -if [ ! -f "/etc/ICTM/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi -source /etc/ICTM/apachevar.list +if [ ! -f "/etc/WebV2/apachevar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GenerateApacheList.sh) ; fi +source /etc/WebV2/apachevar.list for f in $apacheConfDir/sites-available/*; do if [ $IMODE = n ] && [ $PhpPurge = 0 ]; then diff --git a/CoreModules/apache/preconf.sh b/CoreModules/apache/preconf.sh index 441a93f..5972eb6 100644 --- a/CoreModules/apache/preconf.sh +++ b/CoreModules/apache/preconf.sh @@ -11,7 +11,7 @@ fi #Storing vars to config for storeme in apacheService apacheConfDir; do - declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/apachevar.list + declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/apachevar.list done -curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=apache osrel=$shortdist bash > $OUTPUT 2>&1 > $OUTPUT 2>&1 \ No newline at end of file +curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=apache osrel=$shortdist bash > $OUTPUT 2>&1 > $OUTPUT 2>&1 \ No newline at end of file diff --git a/CoreModules/generic/preconf.sh b/CoreModules/generic/preconf.sh index 10f3a35..3ad157a 100644 --- a/CoreModules/generic/preconf.sh +++ b/CoreModules/generic/preconf.sh @@ -6,7 +6,7 @@ if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ] || [ "$shortdist # Repositories # ##--------------## - curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=universe osrel=$shortdist bash > $OUTPUT 2>&1 + curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=universe osrel=$shortdist bash > $OUTPUT 2>&1 ##------------## # System # ##------------## @@ -39,7 +39,7 @@ elif [ "$shortdist" = "el8" ]; then # Repositories # ##--------------## - curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=epel osrel=$shortdist bash > $OUTPUT 2>&1 + curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=epel osrel=$shortdist bash > $OUTPUT 2>&1 ##------------## # System # @@ -65,13 +65,13 @@ fi # Prerequisite packages # ##-----------------------## -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 +curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash > $OUTPUT 2>&1 ##--------------## # Repositories # ##--------------## -curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=php osrel=$shortdist bash > $OUTPUT 2>&1 +curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=php osrel=$shortdist bash > $OUTPUT 2>&1 ##------------## diff --git a/CoreModules/nginx/conf.sh b/CoreModules/nginx/conf.sh index 3c8177f..bec5754 100644 --- a/CoreModules/nginx/conf.sh +++ b/CoreModules/nginx/conf.sh @@ -55,7 +55,7 @@ unset monitconf echo "$webserv is functioning normally" > /usr/share/nginx/html/index.html #Add Nginx as SSL service -echo "nginx" >> /etc/ICTM/SslServices +echo "nginx" >> /etc/WebV2/SslServices systemctl start nginx > $OUTPUT 2>&1 systemctl enable nginx > $OUTPUT 2>&1 \ No newline at end of file diff --git a/CoreModules/nginx/preconf.sh b/CoreModules/nginx/preconf.sh index 2e50473..c53aee2 100644 --- a/CoreModules/nginx/preconf.sh +++ b/CoreModules/nginx/preconf.sh @@ -1 +1 @@ -curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=nginx osrel=$shortdist bash > $OUTPUT 2>&1 \ No newline at end of file +curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=nginx osrel=$shortdist bash > $OUTPUT 2>&1 \ No newline at end of file diff --git a/CoreModules/nginx_nonphp/conf.sh b/CoreModules/nginx_nonphp/conf.sh index de20896..26ae9b4 100644 --- a/CoreModules/nginx_nonphp/conf.sh +++ b/CoreModules/nginx_nonphp/conf.sh @@ -29,7 +29,7 @@ sed -i -e 's/DOMAINname/'$domain'/g' /etc/nginx/sites-available/"$sitename"_ssl echo "$webserv is functioning normally" > /usr/share/nginx/html/index.html #Add Nginx as SSL service -echo "nginx" >> /etc/ICTM/SslServices +echo "nginx" >> /etc/WebV2/SslServices systemctl start nginx > $OUTPUT 2>&1 systemctl enable nginx > $OUTPUT 2>&1 \ No newline at end of file diff --git a/CoreModules/nginx_nonphp/preconf.sh b/CoreModules/nginx_nonphp/preconf.sh index c0b8fdf..43c46b8 100644 --- a/CoreModules/nginx_nonphp/preconf.sh +++ b/CoreModules/nginx_nonphp/preconf.sh @@ -1,4 +1,4 @@ -curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=nginx osrel=$shortdist bash > $OUTPUT 2>&1 +curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=nginx osrel=$shortdist bash > $OUTPUT 2>&1 #Disable PhpMyadmin and Backend cms disbackendcms=1 diff --git a/Docs/Readme.md b/Docs/Readme.md index 67d00ba..92c1f78 100644 --- a/Docs/Readme.md +++ b/Docs/Readme.md @@ -1 +1 @@ -# Source files for https://git.ictmaatwerk.com/docs/Web-V2/ +# Source files for Web-V2 Documentation diff --git a/Docs/docs/Dev-Adding-Modules.md b/Docs/docs/Dev-Adding-Modules.md index 1526377..ff0e60f 100644 --- a/Docs/docs/Dev-Adding-Modules.md +++ b/Docs/docs/Dev-Adding-Modules.md @@ -60,4 +60,4 @@ add to the “``Options” variable after the last entry Make sure the the entry is quoted, otherwise the installer will break ### Extra step for external modules For external modules the raw git url shoud be added to “extModules.list” -Example: https://git.ictmaatwerk.com/``/``/raw/branch/master/ \ No newline at end of file +Example: https://git.bprieshof.nl/``/``/raw/branch/main/ \ No newline at end of file diff --git a/Docs/docs/User-MainInfo.md b/Docs/docs/User-MainInfo.md index 30c8aec..c037dd5 100644 --- a/Docs/docs/User-MainInfo.md +++ b/Docs/docs/User-MainInfo.md @@ -2,36 +2,36 @@ Using curl ``` -curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh +curl https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh bash /tmp/installer.sh ``` Using wget ``` -wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh +wget https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh bash /tmp/installer.sh ``` # Getting/using the Legacy installer (installer.sh): Using curl ``` -curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh +curl https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh bash /tmp/installer.sh -l 2>&1 | tee ~/output.log ``` Using wget ``` -wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh +wget https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh bash /tmp/installer.sh -l 2>&1 | tee ~/output.log ``` # Adding a Domain (AppendCMS.sh): The script wil get most information it need from stored config, only the new domain and the mysql root password need to be entered. ``` -bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendCMS.sh) +bash <(curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/AppendCMS.sh) ``` # Adding a Module/Option (AppendModule.sh): The script wil get most information it need from stored config ``` -bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendModule.sh) +bash <(curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/AppendModule.sh) ``` \ No newline at end of file diff --git a/Docs/mkdocs.yml b/Docs/mkdocs.yml index 804a643..82798b7 100644 --- a/Docs/mkdocs.yml +++ b/Docs/mkdocs.yml @@ -1,7 +1,7 @@ site_name: Web-V2 theme: slate repo_name: 'Git Repo' -repo_url: https://git.ictmaatwerk.com/VPS-scripts/Web-V2/src/branch/master +repo_url: https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/src/branch/master nav: - User: 'User-MainInfo.md' - Development: diff --git a/PhpUpdater.sh b/PhpUpdater.sh index d4dd556..0bcfce4 100644 --- a/PhpUpdater.sh +++ b/PhpUpdater.sh @@ -1,20 +1,20 @@ #sysCheck -if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi +if [ ! -f "/etc/WebV2/selopts.list" ] || [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi rm /tmp/pkg.list #Getting variables -source /etc/ICTM/mainvar.list +source /etc/WebV2/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 [ ! -f "/etc/WebV2/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi +source /etc/WebV2/phpvar.list if [ "$shortdist" = "ubu1804" ] || [ "$shortdist" = "ubu2004" ]; then # Ubuntu Php variable apt update - if ! ls /var/lib/apt/lists/ppa.launchpad.net_ondrej_php*_Packages > /dev/null 2>&1 ; then echo 'PHP(Sury) repo not installed' && echo 'Install using: curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=php bash' && exit ; fi + if ! ls /var/lib/apt/lists/ppa.launchpad.net_ondrej_php*_Packages > /dev/null 2>&1 ; then echo 'PHP(Sury) repo not installed' && echo 'Install using: curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=php bash' && exit ; fi RepoVersion=`grep -h '^Package: php' /var/lib/apt/lists/ppa.launchpad.net_ondrej_php*_Packages | cut -f1 -d"-" | sort | tail -1| sed -e 's/Package: php//'` elif [ "$shortdist" = "deb10" ]|| [ "$shortdist" = "deb11" ]; then # Debian Php variable apt update - if ! ls /var/lib/apt/lists/packages.sury.org_php*_Packages > /dev/null 2>&1 ; then echo 'PHP(Sury) repo not installed' && echo 'Install using: curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=php bash' && exit ; fi + if ! ls /var/lib/apt/lists/packages.sury.org_php*_Packages > /dev/null 2>&1 ; then echo 'PHP(Sury) repo not installed' && echo 'Install using: curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=php bash' && exit ; fi RepoVersion=`grep -h '^Package: php' /var/lib/apt/lists/packages.sury.org*_Packages| cut -f1 -d"-" | sort | tail -1| sed -e 's/Package: php//'` elif [ "$shortdist" = "el8" ]; then dnf check-update --refresh @@ -126,13 +126,13 @@ systemctl start $newphpFPMService systemctl enable $newphpFPMService -sed -i "/phpver/c\phpver=\"$newphpver\"" /etc/ICTM/mainvar.list +sed -i "/phpver/c\phpver=\"$newphpver\"" /etc/WebV2/mainvar.list -mv /etc/ICTM/phpvar.list /etc/ICTM/phpvar"$phpver".list +mv /etc/WebV2/phpvar.list /etc/WebV2/phpvar"$phpver".list for storeme in newphpPoolDir newphpPkgName newphpMainConf newphpFPMService; do - declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list + declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/phpvar.list done -sed -i 's/new//' /etc/ICTM/phpvar.list +sed -i 's/new//' /etc/WebV2/phpvar.list if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh; then source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/"$webserv"/phpupdate-handeler.sh) diff --git a/README.md b/README.md index ce86ee3..19cae44 100644 --- a/README.md +++ b/README.md @@ -3,36 +3,36 @@ **Default/Graphical installer**: Using curl ``` -curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh +curl https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh bash /tmp/installer.sh ``` Using wget ``` -wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh +wget https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh bash /tmp/installer.sh ``` **Legacy Installer for developing and debugging**: Using curl ``` -curl https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh +curl https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh bash /tmp/installer.sh -l 2>&1 | tee ~/output.log ``` Using wget ``` -wget https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh +wget https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh bash /tmp/installer.sh -l 2>&1 | tee ~/output.log ``` ## Adding extra CMS/Site after instalation ``` -bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendCMS.sh) +bash <(curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/AppendCMS.sh) ``` ## Adding extra Module after instalation ``` -bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/Web-V2/raw/branch/master/AppendModule.sh) +bash <(curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2/raw/branch/master/AppendModule.sh) ``` ### This script uses the following repo's as dependencies: @@ -41,5 +41,4 @@ bash <(curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts * VPS-scripts/Ubuntu-MySQL ``` ------ -### Further documentation can be found at https://git.ictmaatwerk.com/docs/Web-V2/ \ No newline at end of file +----- \ No newline at end of file diff --git a/Scripts/Compat/Compat-V2.sh b/Scripts/Compat/Compat-V2.sh index 82786a2..b79582c 100644 --- a/Scripts/Compat/Compat-V2.sh +++ b/Scripts/Compat/Compat-V2.sh @@ -1,7 +1,7 @@ -if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi +if [ ! -f "/etc/WebV2/selopts.list" ] || [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi #Getting information and vars -source /etc/ICTM/mainvar.list +source /etc/WebV2/mainvar.list #CompatUpdater Setup UpdaterCompatTo=2 @@ -17,7 +17,7 @@ aonoption="/MySQL/" aonoption="$aonoption /Unattended-Security-Updates/" aonoption="$aonoption /Backup-Util/" aonoption="$aonoption /AcmeSH/" -echo 'EnabledAons=('$aonoption')' >> /etc/ICTM/selopts.list -declare -p CompatVer | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list +echo 'EnabledAons=('$aonoption')' >> /etc/WebV2/selopts.list +declare -p CompatVer | cut -d ' ' -f 3- >> /etc/WebV2/mainvar.list printf " [\033[0;32mok\033[0m]\n" diff --git a/Scripts/EnableSSL.sh b/Scripts/EnableSSL.sh index d522d03..1a65cff 100644 --- a/Scripts/EnableSSL.sh +++ b/Scripts/EnableSSL.sh @@ -1,5 +1,5 @@ #loading install vars -source /etc/ICTM/mainvar.list +source /etc/WebV2/mainvar.list #Setting Vars sitename=CONFname domain=DOMAINname @@ -9,7 +9,7 @@ webservice=WebServer #Correcting service name for Apache if [ $webservice = apache ]; then\ - source /etc/ICTM/apachevar.list + source /etc/WebV2/apachevar.list webservice="$apacheService" ext=.conf fi @@ -38,7 +38,7 @@ if test $certsatus -eq 0 then site_ext="ssl" mkdir -p /etc/acmesh/inst/$domain - /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/ICTM/SslServices)' + /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/WebV2/SslServices)' else site_ext="nossl" rm -rf /etc/acmesh/certs/$domain* diff --git a/Scripts/GenerateApacheList.sh b/Scripts/GenerateApacheList.sh index 4c5670b..de60b1a 100644 --- a/Scripts/GenerateApacheList.sh +++ b/Scripts/GenerateApacheList.sh @@ -1,5 +1,5 @@ -if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi -source /etc/ICTM/mainvar.list +if [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi +source /etc/WebV2/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" ] || [ "$shortdist" = "deb11" ] ; then @@ -15,5 +15,5 @@ fi #Storing vars to config for storeme in apacheService apacheConfDir; do - declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/apachevar.list + declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/apachevar.list done diff --git a/Scripts/GeneratePhplist.sh b/Scripts/GeneratePhplist.sh index c31b16d..0a63473 100644 --- a/Scripts/GeneratePhplist.sh +++ b/Scripts/GeneratePhplist.sh @@ -1,5 +1,5 @@ -if [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi -source /etc/ICTM/mainvar.list +if [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi +source /etc/WebV2/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" ] || [ "$shortdist" = "deb11" ] ; then @@ -19,5 +19,5 @@ fi #Storing vars to config for storeme in phpPoolDir phpPkgName phpMainConf phpFPMService; do - declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list + declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/phpvar.list done \ No newline at end of file diff --git a/Scripts/Php-EnableSessionsToRam.sh b/Scripts/Php-EnableSessionsToRam.sh index 0951df0..8abc7f6 100644 --- a/Scripts/Php-EnableSessionsToRam.sh +++ b/Scripts/Php-EnableSessionsToRam.sh @@ -9,9 +9,9 @@ ####################################################### #sysCheck -if [ ! -f "/etc/ICTM/selopts.list" ] || [ ! -f "/etc/ICTM/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; 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 [ ! -f "/etc/WebV2/selopts.list" ] || [ ! -f "/etc/WebV2/mainvar.list" ] ; then echo 'This system is not yet setup, please run the main installer first' && exit ; fi +if [ ! -f "/etc/WebV2/phpvar.list" ] ; then bash <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/GeneratePhplist.sh) ; fi +source /etc/WebV2/phpvar.list #Stop php service systemctl stop $phpFPMService diff --git a/Scripts/SMI.sh b/Scripts/SMI.sh index b4ee86c..a106060 100644 --- a/Scripts/SMI.sh +++ b/Scripts/SMI.sh @@ -66,8 +66,8 @@ unset dist_ver dist APTMODE #Repo Vars -repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2 -branch=master +repo=https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2 +branch=main branchtype=branch ###Select Module type @@ -137,7 +137,7 @@ 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 +curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=init osrel=$shortdist bash > $OUTPUT 2>&1 $PKGUC $PKGUP diff --git a/Scripts/toggles/toggle-Monit_APACHE.sh b/Scripts/toggles/toggle-Monit_APACHE.sh index 122b4b4..c6d2c26 100644 --- a/Scripts/toggles/toggle-Monit_APACHE.sh +++ b/Scripts/toggles/toggle-Monit_APACHE.sh @@ -7,25 +7,25 @@ function usage { echo } if [ -n "$1" ]; then - if [[ ! -f /etc/ICTM/toggle.conf ]]; then + if [[ ! -f /etc/WebV2/toggle.conf ]]; then echo "Creating File" - touch /etc/ICTM/toggle.conf + touch /etc/WebV2/toggle.conf fi - source /etc/ICTM/toggle.conf + source /etc/WebV2/toggle.conf if [ -z "$MonitWeb" ]; then echo "Creating Var" - echo "MonitWeb=3" >> /etc/ICTM/toggle.conf + echo "MonitWeb=3" >> /etc/WebV2/toggle.conf MonitWeb=3 fi if [[ "$1" = "-d" && "$MonitWeb" != 0 ]]; then echo "Disable MonitWebui" - sed -i '/MonitWeb=/c\MonitWeb=0' /etc/ICTM/toggle.conf + sed -i '/MonitWeb=/c\MonitWeb=0' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/#enables\/disables monit-websocket/!b;n;cdeny from all' /APADIR/sites-enabled/010-Backend.conf sed -i '/#enables\/disables monit-websocket/ s/^#*/#/' MONITCONF systemctl reload APASRV monit elif [[ "$1" = "-e" && "$MonitWeb" != 1 ]]; then echo "Enable MonitWebui" - sed -i '/MonitWeb=/c\MonitWeb=1' /etc/ICTM/toggle.conf + sed -i '/MonitWeb=/c\MonitWeb=1' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/#enables\/disables monit-websocket/!b;n;c#deny from all' /APADIR/sites-enabled/010-Backend.conf sed -i '/#enables\/disables monit-websocket/ s/^.//' MONITCONF systemctl reload APASRV monit diff --git a/Scripts/toggles/toggle-Monit_NGINX.sh b/Scripts/toggles/toggle-Monit_NGINX.sh index 4091ad4..f91ef13 100644 --- a/Scripts/toggles/toggle-Monit_NGINX.sh +++ b/Scripts/toggles/toggle-Monit_NGINX.sh @@ -7,25 +7,25 @@ function usage { echo } if [ -n "$1" ]; then - if [[ ! -f /etc/ICTM/toggle.conf ]]; then + if [[ ! -f /etc/WebV2/toggle.conf ]]; then echo "Creating File" - touch /etc/ICTM/toggle.conf + touch /etc/WebV2/toggle.conf fi - source /etc/ICTM/toggle.conf + source /etc/WebV2/toggle.conf if [ -z "$MonitWeb" ]; then echo "Creating Var" - echo "MonitWeb=3" >> /etc/ICTM/toggle.conf + echo "MonitWeb=3" >> /etc/WebV2/toggle.conf MonitWeb=3 fi if [[ "$1" = "-d" && "$MonitWeb" != 0 ]]; then echo "Disable MonitWebui" - sed -i '/MonitWeb=/c\MonitWeb=0' /etc/ICTM/toggle.conf + sed -i '/MonitWeb=/c\MonitWeb=0' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/deny all; #enables\/disables monit-websocket/c\ deny all; #enables\/disables monit-websocket' /etc/nginx/sites-enabled/Backend sed -i '/#enables\/disables monit-websocket/ s/^#*/#/' MONITCONF systemctl reload nginx monit elif [[ "$1" = "-e" && "$MonitWeb" != 1 ]]; then echo "Enable MonitWebui" - sed -i '/MonitWeb=/c\MonitWeb=1' /etc/ICTM/toggle.conf + sed -i '/MonitWeb=/c\MonitWeb=1' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/deny all; #enables\/disables monit-websocket/c\ #deny all; #enables\/disables monit-websocket' /etc/nginx/sites-enabled/Backend sed -i '/#enables\/disables monit-websocket/ s/^.//' MONITCONF systemctl reload nginx monit diff --git a/Scripts/toggles/toggle-Netdata_NGINX.sh b/Scripts/toggles/toggle-Netdata_NGINX.sh index 86a4c84..cdb96e3 100644 --- a/Scripts/toggles/toggle-Netdata_NGINX.sh +++ b/Scripts/toggles/toggle-Netdata_NGINX.sh @@ -7,26 +7,26 @@ function usage { echo } if [ -n "$1" ]; then - if [[ ! -f /etc/ICTM/toggle.conf ]]; then + if [[ ! -f /etc/WebV2/toggle.conf ]]; then echo "Creating File" - touch /etc/ICTM/toggle.conf + touch /etc/WebV2/toggle.conf fi - source /etc/ICTM/toggle.conf + source /etc/WebV2/toggle.conf if [ -z "$NetDa" ]; then echo "Creating Var" - echo "NetDa=3" >> /etc/ICTM/toggle.conf + echo "NetDa=3" >> /etc/WebV2/toggle.conf NetDa=3 fi if [[ "$1" = "-d" && "$NetDa" != 0 ]]; then echo "Disable Netdata" - sed -i '/NetDa=/c\NetDa=0' /etc/ICTM/toggle.conf + sed -i '/NetDa=/c\NetDa=0' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/deny all; #enables\/disables Netdata/c\ deny all; #enables\/disables Netdata' /etc/nginx/sites-enabled/Backend systemctl stop netdata systemctl disable netdata > /dev/null 2>&1 systemctl reload nginx elif [[ "$1" = "-e" && "$NetDa" != 1 ]]; then echo "Enable Netdata" - sed -i '/NetDa=/c\NetDa=1' /etc/ICTM/toggle.conf + sed -i '/NetDa=/c\NetDa=1' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/deny all; #enables\/disables Netdata/c\ #deny all; #enables\/disables Netdata' /etc/nginx/sites-enabled/Backend systemctl start netdata systemctl enable netdata > /dev/null 2>&1 diff --git a/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh b/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh index 9a14209..dff734b 100644 --- a/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh +++ b/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh @@ -7,24 +7,24 @@ function usage { echo } if [ -n "$1" ]; then - if [[ ! -f /etc/ICTM/toggle.conf ]]; then + if [[ ! -f /etc/WebV2/toggle.conf ]]; then echo "Creating File" - touch /etc/ICTM/toggle.conf + touch /etc/WebV2/toggle.conf fi - source /etc/ICTM/toggle.conf + source /etc/WebV2/toggle.conf if [ -z "$PhpMA" ]; then echo "Creating Var" - echo "PhpMA=3" >> /etc/ICTM/toggle.conf + echo "PhpMA=3" >> /etc/WebV2/toggle.conf PhpMA=3 fi if [[ "$1" = "-d" && "$PhpMA" != 0 ]]; then echo "Disable PhpMyadmin" - sed -i '/PhpMA=/c\PhpMA=0' /etc/ICTM/toggle.conf + sed -i '/PhpMA=/c\PhpMA=0' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;cdeny from all' /APADIR/sites-enabled/010-Backend.conf systemctl reload APASRV elif [[ "$1" = "-e" && "$PhpMA" != 1 ]]; then echo "Enable PhpMyadmin" - sed -i '/PhpMA=/c\PhpMA=1' /etc/ICTM/toggle.conf + sed -i '/PhpMA=/c\PhpMA=1' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;c#deny from all' /APADIR/sites-enabled/010-Backend.conf systemctl reload APASRV elif [[ "$1" = "-h" ]]; then diff --git a/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh b/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh index b5403a0..c742c0f 100644 --- a/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh +++ b/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh @@ -7,24 +7,24 @@ function usage { echo } if [ -n "$1" ]; then - if [[ ! -f /etc/ICTM/toggle.conf ]]; then + if [[ ! -f /etc/WebV2/toggle.conf ]]; then echo "Creating File" - touch /etc/ICTM/toggle.conf + touch /etc/WebV2/toggle.conf fi - source /etc/ICTM/toggle.conf + source /etc/WebV2/toggle.conf if [ -z "$PhpMA" ]; then echo "Creating Var" - echo "PhpMA=3" >> /etc/ICTM/toggle.conf + echo "PhpMA=3" >> /etc/WebV2/toggle.conf PhpMA=3 fi if [[ "$1" = "-d" && "$PhpMA" != 0 ]]; then echo "Disable PhpMyadmin" - sed -i '/PhpMA=/c\PhpMA=0' /etc/ICTM/toggle.conf + sed -i '/PhpMA=/c\PhpMA=0' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/deny all; #enables\/disables PHPMyadmin/c\ deny all; #enables\/disables PHPMyadmin' /etc/nginx/sites-enabled/Backend systemctl reload nginx elif [[ "$1" = "-e" && "$PhpMA" != 1 ]]; then echo "Enable PhpMyadmin" - sed -i '/PhpMA=/c\PhpMA=1' /etc/ICTM/toggle.conf + sed -i '/PhpMA=/c\PhpMA=1' /etc/WebV2/toggle.conf sed -i --follow-symlinks '/deny all; #enables\/disables PHPMyadmin/c\ #deny all; #enables\/disables PHPMyadmin' /etc/nginx/sites-enabled/Backend systemctl reload nginx elif [[ "$1" = "-h" ]]; then diff --git a/SubModules/php-fpm/preconf.sh b/SubModules/php-fpm/preconf.sh index ed060e4..fecde0c 100644 --- a/SubModules/php-fpm/preconf.sh +++ b/SubModules/php-fpm/preconf.sh @@ -35,5 +35,5 @@ fi #Storing vars to config for storeme in phpPoolDir phpPkgName phpMainConf phpFPMService phpVerBranch; do - declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/phpvar.list + declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/phpvar.list done \ No newline at end of file diff --git a/SubModules/postfix/Postfix-EnableSSL.sh b/SubModules/postfix/Postfix-EnableSSL.sh index 7bd2e61..8053728 100644 --- a/SubModules/postfix/Postfix-EnableSSL.sh +++ b/SubModules/postfix/Postfix-EnableSSL.sh @@ -1,7 +1,7 @@ #Sript for setting up SSL/TLS for Postfix (Web-V2) ##Loading install vars -source /etc/ICTM/mainvar.list +source /etc/WebV2/mainvar.list ##Checking if hostname cert exists if [ ! -f "/etc/acmesh/inst/$hostname/cert.pem" ] || [ ! -f "/etc/acmesh/inst/$hostname/key.pem" ] ; then echo 'SSL Certificate for $hostname is not installed' && exit ; fi @@ -15,7 +15,7 @@ printf " [\e[1;32m Ok \e[0m]\n" ##Adding postfix to SSL services (so it gets reloaded when a the cert is renewd) printf "Updating SSL services list" -echo "postfix" >> /etc/ICTM/SslServices +echo "postfix" >> /etc/WebV2/SslServices printf " [\e[1;32m Ok \e[0m]\n" ##Remove script diff --git a/SubModules/postfix/conf.sh b/SubModules/postfix/conf.sh index 7ccc6b6..10619ef 100644 --- a/SubModules/postfix/conf.sh +++ b/SubModules/postfix/conf.sh @@ -95,7 +95,7 @@ curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules #if using Append module run for existing cms/sites if [ "$itype" = "AddMod" ]; then - for file in /etc/ICTM/sites/*; do + for file in /etc/WebV2/sites/*; do sitename="${file##*/}" domain=${sitename//_/.} source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/SubModules/postfix/CMSHook-preconf.sh) diff --git a/SubModules/redis/preconf.sh b/SubModules/redis/preconf.sh index cc761e0..6f698c3 100644 --- a/SubModules/redis/preconf.sh +++ b/SubModules/redis/preconf.sh @@ -10,4 +10,4 @@ elif [ "$shortdist" = "el8" ]; then fi -curl --retry 7 --retry-delay 5 -s https://git.ictmaatwerk.com/VPS-scripts/General/raw/branch/Main/Setup-Repo.sh |repo=redis osrel=$shortdist bash > $OUTPUT 2>&1 \ No newline at end of file +curl --retry 7 --retry-delay 5 -s https://git.bprieshof.nl/Work/PKGRepoSetup/raw/branch/Main/Setup-Repo.sh |repo=redis osrel=$shortdist bash > $OUTPUT 2>&1 \ No newline at end of file diff --git a/extModules.list b/extModules.list index 7fee0bf..d1ec097 100644 --- a/extModules.list +++ b/extModules.list @@ -1,5 +1,4 @@ -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/ -https://git.ictmaatwerk.com/VPS-scripts/MariaDB/raw/branch/master/ \ No newline at end of file +https://git.bprieshof.nl/Work_Archive/VPS-scripts_MySQL/raw/branch/main/ +https://git.bprieshof.nl/Work_Archive/VPS-scripts_Unattended-Security-Updates/raw/branch/main/ +https://git.bprieshof.nl/Work_Archive/VPS-scripts_Backup-Util/raw/branch/master/ +https://git.bprieshof.nl/Work_Archive/VPS-scripts_AcmeSH/raw/branch/main/ diff --git a/installer.sh b/installer.sh index c20060f..4d36db7 100644 --- a/installer.sh +++ b/installer.sh @@ -29,12 +29,12 @@ fi ##---------------## #Git-repo -repo=https://git.ictmaatwerk.com/VPS-scripts/Web-V2 -branch=master +repo=https://git.bprieshof.nl/Work_Archive/VPS-scripts_Web-V2 +branch=main branchtype=branch #=branch for branch and =tag for release CompatVer=2 #Installer-config -phpver=7.4 +phpver=8.1 PHPMyadmin=1 #Overwriten by cms's without php sqlver=8.0 SiteCount=1 @@ -93,11 +93,11 @@ unset dist_ver dist APTMODE syscheckoff=0 if [ $TestMode = 1 ]; then -domain=ict-dagbesteding.nl -sitename=ict_DB_nl -email=b.prieshof@ictmaatwerk.com +domain=domain.com +sitename=domain_DB_com +email=user@provider.srv password=MeiFerrieSekureTESTp@ssw0rd4213 -hostname=vdh001.nxdi.nl +hostname=srv1.servers.com sslenable=0 domainwww=0 fi @@ -216,7 +216,7 @@ done # System-Check # ##----------------## -if [[ "$syscheckoff" -ne 1 ]] && [[ -d /etc/ICTM ]]; then msg " This system has already been installed by Web-V2" && exit; fi +if [[ "$syscheckoff" -ne 1 ]] && [[ -d /etc/WebV2 ]]; then msg " This system has already been installed by Web-V2" && exit; fi ##Check for pkgs, not yet setup for Centos # if [[ "$syscheckoff" -ne 1 ]] && [[ ! -z $(dpkg -l | cut -d " " -f 3 | grep "^mysql-server") || ! -z $(dpkg -l | cut -d " " -f 3 | grep "nginx") || ! -z $(dpkg -l | cut -d " " -f 3 | grep "apache") || ! -z $(dpkg -l | cut -d " " -f 3 | grep "php") ]] ; then msg " This system has installed packages, Web-V2 is designed for clean systems" && exit; fi @@ -380,15 +380,15 @@ fi # Storeing vars # ##-----------------## -mkdir -p /etc/ICTM/sites -echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/ICTM/mainvar.list +mkdir -p /etc/WebV2/sites +echo "InstDate=$(date "+%d-%B-%Y")" >> /etc/WebV2/mainvar.list for storeme in PKGM PKGI PKGUC PKGUP PKGLIST OUTPUT IMODE shortdist repo branch branchtype webserv email shortdist hostname CompatVer; do - declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list + declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/mainvar.list done -touch /etc/ICTM/sites/"$sitename" -echo "SiteCount=$SiteCount" > /etc/ICTM/sites.count +touch /etc/WebV2/sites/"$sitename" +echo "SiteCount=$SiteCount" > /etc/WebV2/sites.count ##----------## # Addons # @@ -440,7 +440,7 @@ done option="${option%"${option##*[![:space:]]}"}" fi #saving selected modules -echo 'SelectedOptions=('$option')' > /etc/ICTM/selopts.list +echo 'SelectedOptions=('$option')' > /etc/WebV2/selopts.list #Cleaning options from menu option="${option,,}" && option="${option// /}" && option="${option//:/ }" && option="${option//'"'}" @@ -451,7 +451,7 @@ if curl --retry 2 --retry-delay 1 --output /dev/null --silent --head --fail "$re fi #saving enabled Allways on modules -echo 'EnabledAons=('$aonoption')' >> /etc/ICTM/selopts.list +echo 'EnabledAons=('$aonoption')' >> /etc/WebV2/selopts.list #Combining selected option with always-on options option="$option""$aonoption" @@ -611,7 +611,7 @@ done #Saving updated vars for storeme in phpver sqlver PHPMyadmin; do - declare -p $storeme | cut -d ' ' -f 3- >> /etc/ICTM/mainvar.list + declare -p $storeme | cut -d ' ' -f 3- >> /etc/WebV2/mainvar.list done ##-------------## @@ -680,7 +680,7 @@ if [ $sslenable = 1 ]; then then site_ext="ssl" mkdir -p /etc/acmesh/inst/$domain - /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/ICTM/SslServices)' + /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $domain --cert-file /etc/acmesh/inst/$domain/cert.pem --key-file /etc/acmesh/inst/$domain/key.pem --ca-file /etc/acmesh/inst/$domain/ca.cer --fullchain-file /etc/acmesh/inst/$domain/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/WebV2/SslServices)' else site_ext="nossl" rm -rf /etc/acmesh/certs/$domain* @@ -693,7 +693,7 @@ if [ $sslenable = 1 ]; then then siteBackend_ext="ssl" mkdir -p /etc/acmesh/inst/$hostname - /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $hostname --cert-file /etc/acmesh/inst/$hostname/cert.pem --key-file /etc/acmesh/inst/$hostname/key.pem --ca-file /etc/acmesh/inst/$hostname/ca.cer --fullchain-file /etc/acmesh/inst/$hostname/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/ICTM/SslServices)' + /opt/acmesh/acme.sh --config-home '/etc/acmesh/data' --install-cert --ecc --domain $hostname --cert-file /etc/acmesh/inst/$hostname/cert.pem --key-file /etc/acmesh/inst/$hostname/key.pem --ca-file /etc/acmesh/inst/$hostname/ca.cer --fullchain-file /etc/acmesh/inst/$hostname/fullchain.pem --reloadcmd 'systemctl reload $(cat /etc/WebV2/SslServices)' else siteBackend_ext="nossl" rm -rf /etc/acmesh/certs/$hostname*