Used sequpgrade.sh to upgrade existing seqs

This commit is contained in:
2022-05-29 20:58:23 +02:00
parent 10ee4198f0
commit 6214493c18
57 changed files with 802 additions and 806 deletions

View File

@@ -15,19 +15,19 @@ SCRIPT_NAME=$(basename -- $0)
SCRIPT_NAME=${SCRIPT_NAME%%.*}
CONFIG_FILE_TEMPLATE="$WDIR/${SCRIPT_NAME}.cfg.example"
step_config() {
seq_config() {
initSeqConfig -p "$SCRIPT_NAME" "$CONFIG_FILE_TEMPLATE"
if [ $? -eq 0 ] ; then
CONFIG=1
else
[ $DRY -eq 0 ] && return 1
dry || return 1
fi
toolSyslogTag="${SCRIPT_NAME}-$SEQ_PROFILE_NAME"
}
step_1_info() {
echo -n "Backup "
if [ $CONTEXT_HELP -ne 0 ] ; then
if contextHelp ; then
echo -n "selected profile"
else
echo -n "profile: $SEQ_PROFILE_NAME"
@@ -36,7 +36,7 @@ step_1_info() {
echoinfo " [OPTIONS]"
echoinfo " --no-purge, -n : Do not purge old backups after backup"
}
step_1_alias() { ALIAS="backup"; }
step_1_alias() { echo "backup"; }
step_1() {
shift
@@ -89,7 +89,7 @@ step_1() {
}
step_3_info() { echo "Verify selected backup"; }
step_3_alias() { ALIAS="verify"; }
step_3_alias() { echo "verify"; }
step_3() {
shift
@@ -111,7 +111,7 @@ step_5_info() {
echoinfo " (file or folder)"
echoinfo " --time, -t <TIME> : Age of file to be restored"
}
step_5_alias() { ALIAS="restore"; }
step_5_alias() { echo "restore"; }
step_5() {
shift
@@ -134,7 +134,7 @@ step_5() {
done
if [ -z "$1" ] ; then
echoerr " [E] No target provided"
error -e "No target provided"
return 1
fi
local ebuLocalTarget="$1"
@@ -150,7 +150,7 @@ step_5() {
}
step_7_info() { echo "Purge old backups [TARGET]"; }
step_7_alias() { ALIAS="purge"; }
step_7_alias() { echo "purge"; }
step_7() {
shift
local ebuTarget="$EBU_TARGET"
@@ -166,7 +166,7 @@ step_7() {
elif [ ! -z "$EBU_MAX_FULLS_WITH_INCRS" ] ; then
dupCommand+="remove-all-inc-of-but-n-full $EBU_MAX_FULLS_WITH_INCRS "
else
if [ $QUIET -eq 0 ] ; then echoerr " [W] No purge option configured" ; fi
if interactive ; then warning -e "No purge option configured" ; fi
return 1
fi
@@ -180,7 +180,7 @@ step_20_info() {
shift
local ebuTarget=$EBU_TARGET
[ ! -z "$1" ] && ebuTarget="$1"
if [ $CONTEXT_HELP -ne 0 ]; then
if contextHelp; then
echo "Status of (profile) [TARGET]"
elif [ ! -z "$1" ]; then
echo "Status of target: $ebuTarget"
@@ -188,7 +188,7 @@ step_20_info() {
echo "Status of profile \"$SEQ_PROFILE_NAME\" target: $ebuTarget"
fi
}
step_20_alias() { ALIAS='status'; }
step_20_alias() { echo 'status'; }
step_20() {
shift
local ebuTarget="$EBU_TARGET"
@@ -201,7 +201,7 @@ step_20() {
}
step_22_info() { echo "List backup files [TARGET]"; }
step_22_alias() { ALIAS='list'; }
step_22_alias() { echo 'list'; }
step_22() {
shift
local ebuTarget="$EBU_TARGET"
@@ -216,7 +216,7 @@ step_22() {
step_70_info() {
echo -n "Manage cron file for "
if [ $CONTEXT_HELP -ne 0 ] ; then
if contextHelp ; then
echo -n "selected profile"
else
echo -n "profile: $SEQ_PROFILE_NAME"
@@ -225,7 +225,7 @@ step_70_info() {
echoinfo " [OPTIONS]"
echoinfo " --remove, -r : remove cron file"
}
step_70_alias() { ALIAS='cron'; }
step_70_alias() { echo 'cron'; }
step_70() {
shift
local arg
@@ -267,7 +267,7 @@ step_70() {
}
step_72_info() { echo "Update all profile cron files"; }
step_72_alias() { ALIAS="reload"; }
step_72_alias() { echo "reload"; }
step_72() {
for seq in "$SEQ_CONFIG_HOME/"* ; do
seq=$(basename ${seq})
@@ -276,10 +276,10 @@ step_72() {
}
step_100_info() { echo "Install $toolName $toolPpa"; }
step_100_alias() { ALIAS="install"; }
step_100_alias() { echo "install"; }
step_100() {
local aptOpt=
if [ $QUIET -ne 0 ] ; then
if quiet ; then
aptOpt="-y"
fi
@@ -300,7 +300,7 @@ unsetPassphrase() {
checkFileHead() {
local readChar
if [ ! -e "$1" ] ; then
echoerr " [E] File $1 not found"
error -e "File $1 not found"
return 1
fi
read -r -n ${#2} readChar < "$1"
@@ -326,5 +326,5 @@ checkInstalled() {
fi
}
VERSION_SEQREV=12
readonly sqr_minVersion=16
. /usr/local/bin/sequencer.sh