Added init sctipt removal feature
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
red='\e[1;31m%s\e[0m\n'
|
red='\e[1;31m%s\e[0m\n'
|
||||||
printf "\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"
|
printf "\n"
|
||||||
@@ -39,9 +39,10 @@ EOF
|
|||||||
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
||||||
|
|
||||||
#Makeing nextcloud Finalize script and setting login Notice
|
#Makeing nextcloud Finalize script and setting login Notice
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/nextcloud/nextcloud-init.sh -O ~/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'/' ~/nextcloud-init.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
|
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
|
chmod +x /etc/update-motd.d/51-nextnotice
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,3 +18,16 @@ fi
|
|||||||
|
|
||||||
echo "*/5 * * * * SITEname php -f /var/www/DOMAINname/html/cron.php > /dev/null 2>&1" >> /etc/crontab
|
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
|
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
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
red='\e[1;31m%s\e[0m\n'
|
red='\e[1;31m%s\e[0m\n'
|
||||||
printf "\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"
|
printf "\n"
|
||||||
@@ -48,7 +48,8 @@ fi
|
|||||||
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
chown "$sitename":"$sitename" -R /var/www/"$domain"/html
|
||||||
|
|
||||||
#Makeing wordpress Finalize script and setting login Notice
|
#Makeing wordpress Finalize script and setting login Notice
|
||||||
wget -q -t7 "$repo"/raw/branch/"$branch"/CMS/wordpress/wordpress-init.sh -O ~/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'/' ~/wordpress-init.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
|
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
|
chmod +x /etc/update-motd.d/51-wpnotice
|
||||||
@@ -5,3 +5,16 @@ sudo -u SITEname wp --path=/var/www/DOMAINname/html plugin install wp-fail2ban -
|
|||||||
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 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
|
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
|
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
|
||||||
@@ -29,3 +29,16 @@ fi
|
|||||||
#Restoring config
|
#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"
|
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)
|
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
|
||||||
Reference in New Issue
Block a user