Add: post-backup hook Renamed:setup cms-handeler
Added funtion for runing script after Backup Renamed bck-util cms-handeler to CMSHook-conf for future compatibility
This commit is contained in:
@@ -20,6 +20,7 @@ DBPASS='<MSQLRootPW>' #MySQL Root password (syntax '<MSQLRoot
|
||||
#RSYNC
|
||||
RSPORT=22 #Rsync port
|
||||
|
||||
## To run a script after the backup has ran create "Post-backup-hook.sh" in this folder
|
||||
|
||||
##SiteBackup site backup command, multiple commands are allowed
|
||||
#example: SiteBackup -d domain.com -sn domain -db wp_093 -sd "/var/www/domain.com/html" -ext-files "/ext/test.txt" -ai1 -wpupdate
|
||||
@@ -36,4 +37,3 @@ RSPORT=22 #Rsync port
|
||||
# -srsync #syncs site folder via rsync
|
||||
# -srsyncdel #also syncs deletes monthly (day set by DOMC)
|
||||
# -tarenc #Enables encrypyed site Tar backup
|
||||
|
||||
|
||||
@@ -199,3 +199,8 @@ fi
|
||||
#Deletes Temp Folder
|
||||
echo "Clean UP"
|
||||
rm -r "$SENDDIR" && rm -r "$TMPDIR"
|
||||
|
||||
#Check for after Backup hook script
|
||||
if test -f "$ScriptLocation/Post-backup-hook.sh"; then
|
||||
source "$ScriptLocation/Post-backup-hook.sh"
|
||||
fi
|
||||
|
||||
2
conf.sh
2
conf.sh
@@ -42,4 +42,4 @@ fi
|
||||
if [ -z ${db_suffix+x} ]; then db_suffix=`expr $(ls -l /var/www | grep -c ^d) - 1`;fi
|
||||
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/config/Motd/51-bckupnotice -o /etc/update-motd.d/51-bckupnotice
|
||||
chmod +x /etc/update-motd.d/51-bckupnotice
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/cms-handeler.sh)
|
||||
source <(curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/CMSHook-conf.sh)
|
||||
|
||||
Reference in New Issue
Block a user