Friendica root sanity check and small info enhancement

This commit is contained in:
2022-02-17 08:40:10 +01:00
parent 78189e43e7
commit 4c032e6b5e

View File

@@ -17,8 +17,10 @@ step_config() {
fi
}
step_20_info() {
echo -n "Create a backup [FRIENDICA ROOT]"
step_20_info() {
shift
echoinfoArgs "[FRIENDICA ROOT]"
echo -n "Create a backup"
if [ $CONFIG -ne 0 ] ; then
echo " at $FR_BACKUP"
else
@@ -36,13 +38,17 @@ step_20() {
if [ ! -z $FR_BACKUP ] ; then
exe mkdir -p "$FR_BACKUP"
fi
if [ ! -z $1 ] ; then
if [ ! -z "$1" ] ; then
tempRoot="$1"
else
tempRoot="$FR_LOC"
fi
exe $WDIR/mysql.sh -qq backup "$FR_DATABASE" "$FR_BACKUP"
endReturn -o $? "Backup mysql database failed"
[ ! -e "$tempRoot" ] && endReturn -o 1 -f "Friendica root $tempRoot not found"
local wwwBackup="$FR_BACKUP/${toolName}_www_`date +%Y%m%d-%H%M%S`.tar.gz"
local dataBackup="$FR_BACKUP/${toolName}_data_`date +%Y%m%d-%H%M%S`.tar.gz"
echo " [I] Backing up webserver directory to $wwwBackup"
@@ -162,5 +168,5 @@ step_24() {
exe rm -rf "$tempDown"
}
VERSION_SEQREV=11
VERSION_SEQREV=14
. /usr/local/bin/sequencer.sh