diff --git a/CMS/nextcloud/MotdNextCloud b/CMS/nextcloud/MotdNextCloud index 42c6e18..5f84007 100644 --- a/CMS/nextcloud/MotdNextCloud +++ b/CMS/nextcloud/MotdNextCloud @@ -1,5 +1,5 @@ #!/bin/sh red='\e[1;31m%s\e[0m\n' printf "\n" -printf $red "Please run bash ~/nextcloud-init.sh after the first nextcloud login" +printf $red "Please run bash ~/NextcloudInit-SITEname.sh after the first nextcloud login" printf "\n" \ No newline at end of file diff --git a/CMS/nextcloud/conf.sh b/CMS/nextcloud/conf.sh index 89e34cf..b4962ff 100644 --- a/CMS/nextcloud/conf.sh +++ b/CMS/nextcloud/conf.sh @@ -39,9 +39,10 @@ EOF chown "$sitename":"$sitename" -R /var/www/"$domain"/html #Makeing nextcloud Finalize script and setting login Notice -wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/nextcloud-init.sh -O ~/nextcloud-init.sh -sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/nextcloud-init.sh +wget -q -t7 "$repo"/raw/branch/"$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/branch/"$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 diff --git a/CMS/nextcloud/nextcloud-init.sh b/CMS/nextcloud/nextcloud-init.sh index 865d099..f298cba 100644 --- a/CMS/nextcloud/nextcloud-init.sh +++ b/CMS/nextcloud/nextcloud-init.sh @@ -17,4 +17,17 @@ else fi echo "*/5 * * * * SITEname php -f /var/www/DOMAINname/html/cron.php > /dev/null 2>&1" >> /etc/crontab -rm -f /etc/update-motd.d/51-nextnotice \ No newline at end of file +rm -f /etc/update-motd.d/51-nextnotice + +#Remove script +while true; do + read -p "Remove this script -> yes/no?" yn + case $yn in + [Nn]* ) + break;; + [Yy]* ) + rm -- "$0" + break;; + * )echo "Choose yes or no.";; + esac +done \ No newline at end of file diff --git a/CMS/wordpress/MotdWordpress b/CMS/wordpress/MotdWordpress index 4e5a29b..b02c50f 100644 --- a/CMS/wordpress/MotdWordpress +++ b/CMS/wordpress/MotdWordpress @@ -1,5 +1,5 @@ #!/bin/sh red='\e[1;31m%s\e[0m\n' printf "\n" -printf $red "Please run bash ~/wordpress-init.sh after the first wordpress login" +printf $red "Please run bash ~/WordpressInit-SITEname.sh after the first wordpress login" printf "\n" \ No newline at end of file diff --git a/CMS/wordpress/conf.sh b/CMS/wordpress/conf.sh index 5fb66c9..8a234ab 100644 --- a/CMS/wordpress/conf.sh +++ b/CMS/wordpress/conf.sh @@ -48,7 +48,8 @@ fi chown "$sitename":"$sitename" -R /var/www/"$domain"/html #Makeing wordpress Finalize script and setting login Notice -wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/wordpress-init.sh -O ~/wordpress-init.sh -sed -i -e 's/DOMAINname/'$domain'/' -e 's/SITEname/'$sitename'/' ~/wordpress-init.sh +wget -q -t7 "$repo"/raw/branch/"$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/branch/"$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/wordpress-init.sh b/CMS/wordpress/wordpress-init.sh index 180f88d..11c10cf 100644 --- a/CMS/wordpress/wordpress-init.sh +++ b/CMS/wordpress/wordpress-init.sh @@ -4,4 +4,17 @@ sudo -u SITEname wp --path=/var/www/DOMAINname/html theme update --all sudo -u SITEname wp --path=/var/www/DOMAINname/html plugin install wp-fail2ban --activate sudo -u SITEname wp --path=/var/www/DOMAINname/html plugin install all-in-one-wp-migration --activate sudo -u SITEname wp --path=/var/www/DOMAINname/html plugin install https://git.ictmaatwerk.com/downloads/wp/migrate.zip --activate -rm -f /etc/update-motd.d/51-wpnotice \ No newline at end of file +rm -f /etc/update-motd.d/51-wpnotice + +#Remove script +while true; do + read -p "Remove this script -> yes/no?" yn + case $yn in + [Nn]* ) + break;; + [Yy]* ) + rm -- "$0" + break;; + * )echo "Choose yes or no.";; + esac +done \ No newline at end of file diff --git a/Scripts/EnableSSL.sh b/Scripts/EnableSSL.sh index 8f7b2cf..7acabcf 100644 --- a/Scripts/EnableSSL.sh +++ b/Scripts/EnableSSL.sh @@ -29,3 +29,16 @@ fi #Restoring config sed -i -e "0,/^#ConfHere/s/\(^#Conf.*\)/#ConfHere1 /" -e "/#ConfHere1/ r /tmp/"$sitename"-config" -e '/#ConfHere/c\' /etc/"$webservice"/sites-available/"$sitename"_ssl"$ext" source <(curl --retry 7 --retry-delay 5 -s "$repo"/raw/branch/"$branch"/CoreModules/"$webserv"/ssl-handler.sh) + +#Remove script +while true; do + read -p "Remove this script -> yes/no?" yn + case $yn in + [Nn]* ) + break;; + [Yy]* ) + rm -- "$0" + break;; + * )echo "Choose yes or no.";; + esac +done \ No newline at end of file