Added init sctipt removal feature
This commit is contained in:
@@ -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"
|
||||
@@ -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
|
||||
@@ -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
|
||||
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
|
||||
Reference in New Issue
Block a user