This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
wp @azurenight search-replace 'https://www.azurenight.com' 'https://backup.azurenight.com' | |
sed -i 's/\/var\/www\/html/\/var\/www\/localhost\/htdocs/' /var/www/localhost/htdocs/azurenight/.htaccess | |
perl -p -i -e 'print "define('"'"'JETPACK_STAGING_MODE'"'"',true);\n" if /^.*Happy blogging.*$/' /var/www/localhost/htdocs/azurenight/wp-config.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Current backup variables | |
DAY=`date +%d` | |
MONTH=`date +%m` | |
YEAR=`date +%Y` | |
# old backup vairables | |
OLDDAY=`date -d"400 days ago" +%d` | |
OLDMONTH=`date -d"400 days ago" +%m` | |
OLDYEAR=`date -d"400 days ago" +%Y` | |
PATH=$PATH:/usr/local/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=$PATH:/usr/local/bin | |
# Loop through all sites, | |
echo "Starting backups @$(date)" | |
for site in $(cat $HOME/etc/sites); do | |
cd $HOME/backups | |
BKDIR="$HOME/backups/$site/" | |
if [ ! -d "$BKDIR" ]; then |