From 26532b3fd36e96c32ff29eefa404016bf13d1f89 Mon Sep 17 00:00:00 2001 From: Martin Winkler Date: Tue, 14 Jun 2022 11:08:50 +0200 Subject: [PATCH] friendica - Adapt to new sequencer options --- seqs/friendica.sh | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/seqs/friendica.sh b/seqs/friendica.sh index d325e0a..f4bad58 100755 --- a/seqs/friendica.sh +++ b/seqs/friendica.sh @@ -1,19 +1,14 @@ #!/bin/bash -toolName=friendica -latestUrl="https://api.github.com/repos/friendica/friendica/releases/latest" +readonly toolName=friendica +readonly latestUrl="https://api.github.com/repos/friendica/friendica/releases/latest" -# Get script working directory -# (when called from a different directory) -WDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >>/dev/null 2>&1 && pwd )" -CONFIG=0 -CONFIG_FILE_NAME="${toolName}.cfg" -CONFIG_FILE_TEMPLATE="$WDIR/${CONFIG_FILE_NAME}.example" +sq_config=0 seq_config() { - initSeqConfig "$CONFIG_FILE_NAME" "$CONFIG_FILE_TEMPLATE" + initSeqConfig "${seq_configName}" "${seq_configTemplate}" if [ $? -eq 0 ] ; then - CONFIG=1 + sq_config=1 fi } @@ -21,7 +16,7 @@ step_20_info() { shift echoinfoArgs "[FRIENDICA ROOT]" echo -n "Create a backup" - if [ $CONFIG -ne 0 ] ; then + if [ $sq_config -ne 0 ] ; then echo " at $FR_BACKUP" else echo @@ -31,7 +26,7 @@ step_20_alias() { echo "backup"; } step_20() { shift local tempRoot= - if [ $CONFIG -eq 0 ] ; then + if [ $sq_config -eq 0 ] ; then error -e "No configuration file found" return 1 fi @@ -44,7 +39,7 @@ step_20() { tempRoot="$FR_LOC" fi - exe $WDIR/mysql.sh -qq backup "$FR_DATABASE" "$FR_BACKUP" + exe "${seq_dir}/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" @@ -142,7 +137,7 @@ step_22() { endReturn -o $? "Backup failed; $FR_LOC renamed!" echo " [I] Installing version $latestVersion to $FR_LOC" exe mv "$tempExtract" "$FR_LOC" - exe mv "$tempExtractAddons" "$tempAddons" + exe mv "$tempExtractAddons/addon" "$tempAddons" exe chown -R www-data: "$FR_LOC" # Configuration