diff --git a/AppendCMS.sh b/AppendCMS.sh index e6a6672..96ddf96 100644 --- a/AppendCMS.sh +++ b/AppendCMS.sh @@ -229,7 +229,7 @@ elif [ $sslenable = 0 ]; then site_ext=nossl fi -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-$domain.sh +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/EnableSSL.sh -o ~/activateSSL-$domain.sh sed -i -e 's/DOMAINname/'$domain'/' -e 's/CONFname/'$sitename'/' -e 's/DomainWWW/'$domainwww'/' -e 's/Email/'$email'/' -e 's/WebServer/'$webserv'/' ~/activateSSL-$domain.sh msg " Running conf for CMS" diff --git a/AppendModule.sh b/AppendModule.sh index 1824bb2..a5c03e4 100644 --- a/AppendModule.sh +++ b/AppendModule.sh @@ -151,7 +151,7 @@ option="$option""$aonoption" msg " Generating apt list for Options" for val1 in ${option[*]}; do echo "$val1" #TMP - modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") + modListed=$(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") #Checking if test -z "$modListed" then @@ -201,7 +201,7 @@ done msg " Running preconf for Options" for val1 in ${option[*]}; do echo "$val1" #TMP - modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") + modListed=$(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") #Checking if test -z "$modListed" then @@ -240,7 +240,7 @@ cat /tmp/pkg.list | xargs $PKGI msg " Running conf for Options" for val1 in ${option[*]}; do echo "$val1" #TMP - modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") + modListed=$(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") #Checking if test -z "$modListed" then diff --git a/CMS/Backend/apache-conf.sh b/CMS/Backend/apache-conf.sh index db5b1f6..93f823e 100644 --- a/CMS/Backend/apache-conf.sh +++ b/CMS/Backend/apache-conf.sh @@ -1,4 +1,4 @@ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/apache-siteBackend-unconfigured -O /tmp/apache-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/apache-siteBackend-unconfigured -o /tmp/apache-siteconf sed -i -e 's/PHPver/'$phpver'/' -e 's/DOMAINname/'$hostname'/' /tmp/apache-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/Backend_"$site_ext".conf systemctl reload apache2 \ No newline at end of file diff --git a/CMS/Backend/conf.sh b/CMS/Backend/conf.sh index 42ae7b1..0276957 100644 --- a/CMS/Backend/conf.sh +++ b/CMS/Backend/conf.sh @@ -1,5 +1,5 @@ #Backend PHP Pool -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/Backend.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/Fpm-Pool.conf-unconfigured -o /etc/php/"$phpver"/fpm/pool.d/Backend.conf sed -i 's/PHPver/'$phpver'/' /etc/php/"$phpver"/fpm/pool.d/Backend.conf groupadd Backend useradd -g Backend Backend diff --git a/CMS/Backend/nginx-conf.sh b/CMS/Backend/nginx-conf.sh index a92e094..65cd210 100644 --- a/CMS/Backend/nginx-conf.sh +++ b/CMS/Backend/nginx-conf.sh @@ -1,4 +1,4 @@ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/nginx-siteBackend-unconfigured -O /tmp/nginx-backendconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/Backend/nginx-siteBackend-unconfigured -o /tmp/nginx-backendconf sed -i -e 's/PHPver/'$phpver'/' -e 's/DOMAINname/'$hostname'/' /tmp/nginx-backendconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-backendconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/Backend_"$site_ext" systemctl reload nginx diff --git a/CMS/nextcloud/apache-conf.sh b/CMS/nextcloud/apache-conf.sh index f3a43e9..d69ace0 100644 --- a/CMS/nextcloud/apache-conf.sh +++ b/CMS/nextcloud/apache-conf.sh @@ -1,5 +1,5 @@ #Apache -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Apache-unconfigured -O /tmp/apache-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Apache-unconfigured -o /tmp/apache-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf chown "$sitename":"$sitename" -R /var/www/"$domain"/html diff --git a/CMS/nextcloud/conf.sh b/CMS/nextcloud/conf.sh index 4522411..02b3599 100644 --- a/CMS/nextcloud/conf.sh +++ b/CMS/nextcloud/conf.sh @@ -1,12 +1,12 @@ #PHP Pool -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Fpm-Pool.conf-unconfigured -o /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf groupadd "$sitename" useradd -g "$sitename" "$sitename" mkdir -p /var/www/"$domain"/html/data #Getting Nextcloud -wget -t7 http://mirror.nxdi.nl/resources/nextcloud/latest.tar.bz2 -O /tmp/nextcloud.tar.bz2 +curl --retry 7 --retry-delay 5 -s http://mirror.nxdi.nl/resources/nextcloud/latest.tar.bz2 -o /tmp/nextcloud.tar.bz2 tar jxf /tmp/nextcloud.tar.bz2 -C /tmp cp -a /tmp/nextcloud/. /var/www/"$domain"/html touch /var/www/"$domain"/html/data/nextcloud.log @@ -39,9 +39,9 @@ EOF chown "$sitename":"$sitename" -R /var/www/"$domain"/html #Makeing nextcloud Finalize script and setting login Notice -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/nextcloud-init.sh -O ~/NextcloudInit-"$sitename".sh +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/nextcloud-init.sh -o ~/NextcloudInit-"$sitename".sh sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/NextcloudInit-"$sitename".sh -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/MotdNextCloud -O /etc/update-motd.d/51-nextnotice +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/MotdNextCloud -o /etc/update-motd.d/51-nextnotice sed -i -e 's/SITEname/'$sitename'/' /etc/update-motd.d/51-nextnotice chmod +x /etc/update-motd.d/51-nextnotice @@ -52,7 +52,7 @@ chmod 774 -R /var/log/nextcloud ln -s /var/www/"$domain"/html/data/nextcloud.log /var/log/nextcloud/"$sitename" #fail2ban -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/nextcloud_unconfigured -O /etc/fail2ban/jail.d/"$sitename"-nextcloud.local +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/nextcloud_unconfigured -o /etc/fail2ban/jail.d/"$sitename"-nextcloud.local sed -i 's/SITEname/'$sitename'/' /etc/fail2ban/jail.d/"$sitename"-nextcloud.local systemctl reload php"$phpver"-fpm \ No newline at end of file diff --git a/CMS/nextcloud/nginx-conf.sh b/CMS/nextcloud/nginx-conf.sh index 73e5ab6..d8675cf 100644 --- a/CMS/nextcloud/nginx-conf.sh +++ b/CMS/nextcloud/nginx-conf.sh @@ -1,7 +1,7 @@ #Nextcloud major release version #Configuring nginx -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Nginx-unconfigured -O /tmp/nginx-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/nextcloud/Nginx-unconfigured -o /tmp/nginx-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext" if [ $sslenable = 0 ]; then diff --git a/CMS/none/apache-conf.sh b/CMS/none/apache-conf.sh index e94f199..9ede4b1 100644 --- a/CMS/none/apache-conf.sh +++ b/CMS/none/apache-conf.sh @@ -1,4 +1,4 @@ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Apache-unconfigured -O /tmp/apache-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Apache-unconfigured -o /tmp/apache-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf mkdir -p /var/www/"$domain"/html diff --git a/CMS/none/conf.sh b/CMS/none/conf.sh index a72c46f..a85d7e6 100644 --- a/CMS/none/conf.sh +++ b/CMS/none/conf.sh @@ -2,7 +2,7 @@ if [ $webserv != nginx_nonphp ]; then #Setup PHP Pool -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Fpm-Pool.conf-unconfigured -o /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf groupadd "$sitename" useradd -g "$sitename" "$sitename" diff --git a/CMS/none/nginx-conf.sh b/CMS/none/nginx-conf.sh index d08d959..974ceb9 100644 --- a/CMS/none/nginx-conf.sh +++ b/CMS/none/nginx-conf.sh @@ -1,4 +1,4 @@ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx-unconfigured -O /tmp/nginx-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx-unconfigured -o /tmp/nginx-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext" mkdir -p /var/www/"$domain"/html diff --git a/CMS/none/nginx_nonphp-conf.sh b/CMS/none/nginx_nonphp-conf.sh index 2add71e..15858c4 100644 --- a/CMS/none/nginx_nonphp-conf.sh +++ b/CMS/none/nginx_nonphp-conf.sh @@ -1,4 +1,4 @@ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx_nonphp-unconfigured -O /tmp/nginx-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/none/Nginx_nonphp-unconfigured -o /tmp/nginx-siteconf sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext" mkdir -p /var/www/"$domain"/html diff --git a/CMS/wordpress/apache-conf.sh b/CMS/wordpress/apache-conf.sh index 88e2c4b..6c7cefa 100644 --- a/CMS/wordpress/apache-conf.sh +++ b/CMS/wordpress/apache-conf.sh @@ -1,4 +1,4 @@ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Apache-unconfigured -O /tmp/apache-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Apache-unconfigured -o /tmp/apache-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/apache-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/apache-siteconf' -e '/#ConfHere/c\' /etc/apache2/sites-available/"$sitename"_"$site_ext".conf diff --git a/CMS/wordpress/conf.sh b/CMS/wordpress/conf.sh index 71dd2c2..170ae74 100644 --- a/CMS/wordpress/conf.sh +++ b/CMS/wordpress/conf.sh @@ -1,7 +1,7 @@ #WP-CLI if [ ! -f /usr/local/bin/wp ]; then - wget -q -t7 https://raw.githubusercontent.com/wp-cli/wp-cli/v2.4.0/utils/wp-completion.bash -O /etc/bash_completion.d/wp - wget -q -t7 https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/local/bin/wp + curl --retry 7 --retry-delay 5 -s https://raw.githubusercontent.com/wp-cli/wp-cli/v2.4.0/utils/wp-completion.bash -o /etc/bash_completion.d/wp + curl --retry 7 --retry-delay 5 -s https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o /usr/local/bin/wp chmod +x /usr/local/bin/wp fi @@ -10,7 +10,7 @@ db_suffix=`expr $(ls -l /var/www | grep -c ^d) - 1` db_name="wp_$db_suffix" db_user="wp_$db_suffix" db_pass=$(date +%s|sha256sum|base64|head -c 32) -WPSalts=$(wget https://api.wordpress.org/secret-key/1.1/salt/ -q -O -) +WPSalts=$(curl --retry 7 --retry-delay 5 -s https://api.wordpress.org/secret-key/1.1/salt/) #Setting up Database mysql -u root -p"$password" -e "CREATE DATABASE "$db_name" DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" > $OUTPUT 2>&1 @@ -22,17 +22,17 @@ mysql -u root -p"$password" -e "FLUSH PRIVILEGES;" > $OUTPUT 2>&1 mkdir -p /var/www/"$domain"/html #Getting WordPress -wget -q -t7 http://mirror.nxdi.nl/resources/wordpress/latest.tar.gz -O /tmp/wp.tar.gz +curl --retry 7 --retry-delay 5 -s http://mirror.nxdi.nl/resources/wordpress/latest.tar.gz -o /tmp/wp.tar.gz tar -C /var/www/"$domain"/html -xzf /tmp/wp.tar.gz --strip 1 rm /var/www/"$domain"/html/wp-config-sample.php #Configuring WordPress -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/WordPress-unconfigured -O /var/www/"$domain"/html/wp-config.php +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/WordPress-unconfigured -o /var/www/"$domain"/html/wp-config.php sed -i -e 's/DBPass/'$db_pass'/' -e 's/DBUser/'$db_user'/' -e 's/DBName/'$db_name'/' -e 's/DOMAINname/'$domain'/' /var/www/"$domain"/html/wp-config.php printf '%s\n' "g/WPsalty/d" a "$WPSalts" . w | ed -s /var/www/"$domain"/html/wp-config.php #PHP Pool -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -O /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Fpm-Pool.conf-unconfigured -o /etc/php/"$phpver"/fpm/pool.d/"$sitename".conf sed -i -e 's/PHPver/'$phpver'/' -e 's/SITEname/'$sitename'/' -e 's/DOMAINname/'$domain'/' /etc/php/"$phpver"/fpm/pool.d/$sitename.conf groupadd "$sitename" useradd -g "$sitename" "$sitename" @@ -41,15 +41,15 @@ systemctl reload php"$phpver"-fpm #fail2ban if [ ! -f /etc/fail2ban/jail.d/wordpress-syslog.local ]; then - wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/wordpress-syslog.jail -O /etc/fail2ban/jail.d/wordpress-syslog.local + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/wordpress-syslog.jail -o /etc/fail2ban/jail.d/wordpress-syslog.local fi #Setting Permsissions chown "$sitename":"$sitename" -R /var/www/"$domain"/html #Makeing wordpress Finalize script and setting login Notice -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/wordpress-init.sh -O ~/WordpressInit-"$sitename".sh +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/wordpress-init.sh -o ~/WordpressInit-"$sitename".sh sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/WordpressInit-"$sitename".sh -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/MotdWordpress -O /etc/update-motd.d/51-wpnotice +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/MotdWordpress -o /etc/update-motd.d/51-wpnotice sed -i -e 's/SITEname/'$sitename'/' /etc/update-motd.d/51-wpnotice chmod +x /etc/update-motd.d/51-wpnotice \ No newline at end of file diff --git a/CMS/wordpress/nginx-conf.sh b/CMS/wordpress/nginx-conf.sh index 0048116..c476186 100644 --- a/CMS/wordpress/nginx-conf.sh +++ b/CMS/wordpress/nginx-conf.sh @@ -1,5 +1,5 @@ #Configuring nginx -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Nginx-unconfigured -O /tmp/nginx-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CMS/wordpress/Nginx-unconfigured -o /tmp/nginx-siteconf sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' /tmp/nginx-siteconf sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e '/#ConfHere1/ r /tmp/nginx-siteconf' -e '/#ConfHere/c\' /etc/nginx/sites-available/"$sitename"_"$site_ext" diff --git a/CoreModules/apache/appendCMS-conf.sh b/CoreModules/apache/appendCMS-conf.sh index c6fbdef..5684a13 100644 --- a/CoreModules/apache/appendCMS-conf.sh +++ b/CoreModules/apache/appendCMS-conf.sh @@ -4,19 +4,19 @@ if [ $domainwww = 1 ]; then #non-ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf echo "" >> /etc/apache2/sites-available/"$sitename"_nossl.conf #ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf echo "" >> /etc/apache2/sites-available/"$sitename"_ssl.conf fi #non-ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_nossl.conf ln -s /etc/apache2/sites-available/"$sitename"_nossl.conf /etc/apache2/sites-enabled/010-"$sitename".conf #ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_ssl.conf systemctl reload apache2 \ No newline at end of file diff --git a/CoreModules/apache/conf.sh b/CoreModules/apache/conf.sh index 1c15571..3ab0cd6 100644 --- a/CoreModules/apache/conf.sh +++ b/CoreModules/apache/conf.sh @@ -9,43 +9,43 @@ a2dismod mpm_prefork a2enmod actions fcgid alias proxy_fcgi ssl headers http2 setenvif socache_shmcb mkdir -p /etc/apache2/snippets/ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/snippets-ssl.conf -O /etc/apache2/snippets/apa-ssl.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/snippets-backendredir.conf -O /etc/apache2/snippets/apa-backendredir.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/snippets-ssl.conf -o /etc/apache2/snippets/apa-ssl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/snippets-backendredir.conf -o /etc/apache2/snippets/apa-backendredir.conf sed -i -e 's/HOSTname/'$hostname'/' /etc/apache2/snippets/apa-backendredir.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/conf-custom.conf -O /etc/apache2/conf-enabled/zzz-custom.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/conf-custom.conf -o /etc/apache2/conf-enabled/zzz-custom.conf #Catch all (ip and unconfigured domains) -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_CatchAll -O /etc/apache2/sites-available/CatchAll.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_CatchAll -o /etc/apache2/sites-available/CatchAll.conf ln -s /etc/apache2/sites-available/CatchAll.conf /etc/apache2/sites-enabled/999-CatchAll.conf if [ $domainwww = 1 ]; then #non-ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-wwwredir >> /etc/apache2/sites-available/"$sitename"_nossl.conf echo "" >> /etc/apache2/sites-available/"$sitename"_nossl.conf #ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-wwwredir >> /etc/apache2/sites-available/"$sitename"_ssl.conf echo "" >> /etc/apache2/sites-available/"$sitename"_ssl.conf fi #non-ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/"$sitename"_nossl.conf sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_nossl.conf ln -s /etc/apache2/sites-available/"$sitename"_nossl.conf /etc/apache2/sites-enabled/010-"$sitename".conf #ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/"$sitename"_ssl.conf sed -i -e 's/DOMAINname/'$domain'/' /etc/apache2/sites-available/"$sitename"_ssl.conf #non-ssl-Backend -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/Backend_nossl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site-unconfigured >> /etc/apache2/sites-available/Backend_nossl.conf sed -i -e 's/DOMAINname/'$hostname'/' /etc/apache2/sites-available/Backend_nossl.conf ln -s /etc/apache2/sites-available/Backend_nossl.conf /etc/apache2/sites-enabled/010-Backend.conf #ssl-Backend -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/Backend_ssl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/apache/config/apache2/site_ssl-unconfigured >> /etc/apache2/sites-available/Backend_ssl.conf sed -i -e 's/DOMAINname/'$hostname'/' /etc/apache2/sites-available/Backend_ssl.conf mkdir -p /opt/toggle -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh -O /opt/toggle/toggle-PhpMyAdmin.sh +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_APACHE.sh -O /opt/toggle/toggle-PhpMyAdmin.sh # custom Welcome page diff --git a/CoreModules/generic/conf.sh b/CoreModules/generic/conf.sh index 9f41882..d20a0d1 100644 --- a/CoreModules/generic/conf.sh +++ b/CoreModules/generic/conf.sh @@ -30,18 +30,18 @@ echo "y" | ufw enable > $OUTPUT 2>&1 ##------------## #General config -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/jail.local -O /etc/fail2ban/jail.local +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/jail.local -o /etc/fail2ban/jail.local #Custom Fiters -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Filters/nextcloud.filter -O /etc/fail2ban/filter.d/nextcloud.local -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Filters/phpmyadmin-authlog.filter -O /etc/fail2ban/filter.d/phpmyadmin-authlog.local -wget -q -t7 https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-hard.conf -O /etc/fail2ban/filter.d/wordpress-hard.local -wget -q -t7 https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-soft.conf -O /etc/fail2ban/filter.d/wordpress-soft.local +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Filters/nextcloud.filter -o /etc/fail2ban/filter.d/nextcloud.local +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Filters/phpmyadmin-authlog.filter -o /etc/fail2ban/filter.d/phpmyadmin-authlog.local +curl --retry 7 --retry-delay 5 -s https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-hard.conf -o /etc/fail2ban/filter.d/wordpress-hard.local +curl --retry 7 --retry-delay 5 -s https://plugins.svn.wordpress.org/wp-fail2ban/trunk/filters.d/wordpress-soft.conf -o /etc/fail2ban/filter.d/wordpress-soft.local #General jails rm /etc/fail2ban/jail.d/* -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/sshd.jail -O /etc/fail2ban/jail.d/sshd.local +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/sshd.jail -o /etc/fail2ban/jail.d/sshd.local if [ -z $disbackendcms ]; then - wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/phpmyadmin.jail -O /etc/fail2ban/jail.d/phpmyadmin.local + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/config/fail2ban/Jails/phpmyadmin.jail -o /etc/fail2ban/jail.d/phpmyadmin.local fi diff --git a/CoreModules/nginx/appendCMS-conf.sh b/CoreModules/nginx/appendCMS-conf.sh index 6f9b95a..725cbcc 100644 --- a/CoreModules/nginx/appendCMS-conf.sh +++ b/CoreModules/nginx/appendCMS-conf.sh @@ -4,19 +4,19 @@ if [ $domainwww = 1 ]; then #non-ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl echo "" >> /etc/nginx/sites-available/"$sitename"_nossl #ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl echo "" >> /etc/nginx/sites-available/"$sitename"_ssl fi #non-ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename" #ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl systemctl reload nginx \ No newline at end of file diff --git a/CoreModules/nginx/conf.sh b/CoreModules/nginx/conf.sh index beded4f..8c2b0c4 100644 --- a/CoreModules/nginx/conf.sh +++ b/CoreModules/nginx/conf.sh @@ -5,40 +5,40 @@ systemctl stop nginx ############# mkdir -p /var/www/html /etc/nginx/sites-available /etc/nginx/sites-enabled /etc/nginx/snippets /etc/nginx/modules-available /etc/nginx/modules-enabled /etc/nginx/snippets/ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -O /etc/nginx/fastcgi.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi-php.conf -O /etc/nginx/snippets/fastcgi-php.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -O /etc/nginx/snippets/ngx-ssl.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-backendredir.conf -O /etc/nginx/snippets/ngx-backendredir.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -o /etc/nginx/fastcgi.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi-php.conf -o /etc/nginx/snippets/fastcgi-php.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -o /etc/nginx/snippets/ngx-ssl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-backendredir.conf -o /etc/nginx/snippets/ngx-backendredir.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -o /etc/nginx/nginx.conf if [ $domainwww = 1 ]; then #non-ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl echo "" >> /etc/nginx/sites-available/"$sitename"_nossl #ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl echo "" >> /etc/nginx/sites-available/"$sitename"_ssl fi #non-ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename" #ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl #Backend ##non-ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/Backend_nossl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/Backend_nossl sed -i -e 's/DOMAINname/'$hostname'/' /etc/nginx/sites-available/Backend_nossl ln -s /etc/nginx/sites-available/Backend_nossl /etc/nginx/sites-enabled/Backend ##ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/Backend_ssl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/Backend_ssl sed -i -e 's/DOMAINname/'$hostname'/' /etc/nginx/sites-available/Backend_ssl mkdir -p /opt/toggle -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-Netdata_NGINX.sh -O /opt/toggle/toggle-Netdata.sh -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/toggles/toggle-PhpMyAdmin_NGINX.sh -O /opt/toggle/toggle-PhpMyAdmin.sh +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 # custom Welcome page echo "$webserv is functioning normally" > /usr/share/nginx/html/index.html diff --git a/CoreModules/nginx_nonphp/appendCMS-conf.sh b/CoreModules/nginx_nonphp/appendCMS-conf.sh index 6f9b95a..725cbcc 100644 --- a/CoreModules/nginx_nonphp/appendCMS-conf.sh +++ b/CoreModules/nginx_nonphp/appendCMS-conf.sh @@ -4,19 +4,19 @@ if [ $domainwww = 1 ]; then #non-ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl echo "" >> /etc/nginx/sites-available/"$sitename"_nossl #ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl echo "" >> /etc/nginx/sites-available/"$sitename"_ssl fi #non-ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename" #ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl systemctl reload nginx \ No newline at end of file diff --git a/CoreModules/nginx_nonphp/conf.sh b/CoreModules/nginx_nonphp/conf.sh index fe0506c..dc3a7bb 100644 --- a/CoreModules/nginx_nonphp/conf.sh +++ b/CoreModules/nginx_nonphp/conf.sh @@ -5,24 +5,24 @@ systemctl stop nginx ############# mkdir -p /var/www/html /etc/nginx/sites-available /etc/nginx/sites-enabled /etc/nginx/snippets /etc/nginx/modules-available /etc/nginx/modules-enabled /etc/nginx/snippets/ -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -O /etc/nginx/fastcgi.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -O /etc/nginx/snippets/ngx-ssl.conf -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -O /etc/nginx/nginx.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/fastcgi.conf -o /etc/nginx/fastcgi.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/snippets-ssl.conf -o /etc/nginx/snippets/ngx-ssl.conf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/nginx-default.conf -o /etc/nginx/nginx.conf if [ $domainwww = 1 ]; then #non-ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-wwwredir >> /etc/nginx/sites-available/"$sitename"_nossl echo "" >> /etc/nginx/sites-available/"$sitename"_nossl #ssl - wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl + curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-wwwredir >> /etc/nginx/sites-available/"$sitename"_ssl echo "" >> /etc/nginx/sites-available/"$sitename"_ssl fi #non-ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site-unconfigured >> /etc/nginx/sites-available/"$sitename"_nossl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_nossl ln -s /etc/nginx/sites-available/"$sitename"_nossl /etc/nginx/sites-enabled/"$sitename" #ssl -wget -q -t7 -O - "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/CoreModules/nginx/config/nginx/site_ssl-unconfigured >> /etc/nginx/sites-available/"$sitename"_ssl sed -i -e 's/DOMAINname/'$domain'/' /etc/nginx/sites-available/"$sitename"_ssl # custom Welcome page diff --git a/Docs/docs/Dev-Adding-CMS.md b/Docs/docs/Dev-Adding-CMS.md index f6f28fe..32d3c39 100644 --- a/Docs/docs/Dev-Adding-CMS.md +++ b/Docs/docs/Dev-Adding-CMS.md @@ -34,7 +34,7 @@ ## nginx-conf.sh ``` #Getting Nginx SiteConfig -wget -q -t7 "$repo"/raw/branch/"$branch"/CMS//Nginx-unconfigured -O /tmp/nginx-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS//Nginx-unconfigured -o /tmp/nginx-siteconf #Configuring Nginx SiteConfig sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' /tmp/nginx-siteconf @@ -51,7 +51,7 @@ systemctl reload nginx ``` #Getting Nginx SiteConfig -wget -q -t7 "$repo"/raw/branch/"$branch"/CMS//Nginx-unconfigured -O /tmp/nginx-siteconf +curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CMS//Nginx-unconfigured -o /tmp/nginx-siteconf #Configuring Nginx SiteConfig sed -i -e 's/PHPver/'$phpver'/g' -e 's/DOMAINname/'$domain'/' /tmp/nginx-siteconf diff --git a/README.md b/README.md index 32666b3..be25f2c 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,31 @@ # Ubuntu-Web-V2 **Get Started with the graphical installer**: +Using cUrl +``` +curl https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2/raw/branch/master/installer.sh -o /tmp/installer.sh +bash /tmp/installer.sh +``` + +Using wget ``` wget https://git.ictmaatwerk.com/bprieshof/UBU-Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh bash /tmp/installer.sh ``` -**Legacy Installer for developing and debugging**: +**Legacy Installer for developing and debugging**: +Using cUrl +``` +curl https://git.ictmaatwerk.com/bprieshof/UBU-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/bprieshof/UBU-Web-V2/raw/branch/master/installer.sh -O /tmp/installer.sh bash /tmp/installer.sh -l 2>&1 | tee ~/output.log -``` +``` -#### This script uses the following repo's as dependencies: +### This script uses the following repo's as dependencies: ``` * VPS-scripts/Unattended-Security-Updates * VPS-scripts/Ubuntu-MySQL diff --git a/TO-DO_FIX-CHECK.md b/TO-DO_FIX-CHECK.md index 1eaaf63..451c6fd 100644 --- a/TO-DO_FIX-CHECK.md +++ b/TO-DO_FIX-CHECK.md @@ -2,5 +2,5 @@ ~~Options enable/disable~~ # Other WordPress hardening -DH-key length +DH-key length Switch to curl instead of wget \ No newline at end of file diff --git a/installer.sh b/installer.sh index 975dc92..51f58ea 100644 --- a/installer.sh +++ b/installer.sh @@ -436,7 +436,7 @@ option="$option""$aonoption" #Generating APT-list options for val1 in ${option[*]}; do - modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") + modListed=$(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") #Checking if test -z "$modListed" then @@ -539,7 +539,7 @@ fi #Preconfiguring for Modules for val1 in ${option[*]}; do msg "Pre-configuring $val1" - modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") + modListed=$(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") #Checking if test -z "$modListed" then @@ -599,7 +599,7 @@ fi #Configuring Options for val1 in ${option[*]}; do msg " Configuring $val1" - modListed=$(wget -t7 -qO - "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") + modListed=$(curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/extModules.list|grep "$val1") #Checking if test -z "$modListed" then @@ -643,11 +643,11 @@ elif [ $sslenable = 0 ]; then site_ext=nossl fi -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-$domain.sh +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/EnableSSL.sh -o ~/activateSSL-$domain.sh sed -i -e 's/DOMAINname/'$domain'/' -e 's/CONFname/'$sitename'/' -e 's/DomainWWW/'$domainwww'/' -e 's/Email/'$email'/' -e 's/WebServer/'$webserv'/' ~/activateSSL-$domain.sh if [ -z $disbackendcms ]; then -wget -q -t7 "$repo"/raw/"$branchtype"/"$branch"/Scripts/EnableSSL.sh -O ~/activateSSL-Backend.sh +curl --retry 7 --retry-delay 5 -s "$repo"/raw/"$branchtype"/"$branch"/Scripts/EnableSSL.sh -o ~/activateSSL-Backend.sh sed -i -e 's/DOMAINname/'$hostname'/' -e 's/CONFname/'Backend'/' -e 's/DomainWWW/'0'/' -e 's/Email/'$email'/' -e 's/WebServer/'$webserv'/' ~/activateSSL-Backend.sh fi