friendica - Adapt to new sequencer options
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user