diff --git a/seqs/backup.sh b/seqs/backup.sh index b4c428b..0fd0215 100755 --- a/seqs/backup.sh +++ b/seqs/backup.sh @@ -36,7 +36,7 @@ step_1() { local buTarget="/backup" if [ $CONFIG -eq 0 ] ; then error -e "Cannot backup root without properly configured excludes" - error -e " (expected config: $SEQ_CONFIG_HOME/$CONFIG_FILE_NAME)" + error -e " (expected config: $seq_configRoot/$CONFIG_FILE_NAME)" else buTarget="$BACKUP_TARGET" fi diff --git a/seqs/ebackup.sh b/seqs/ebackup.sh index 0a43062..12505be 100755 --- a/seqs/ebackup.sh +++ b/seqs/ebackup.sh @@ -22,7 +22,7 @@ seq_config() { else dry || return 1 fi - toolSyslogTag="${SCRIPT_NAME}-$SEQ_PROFILE_NAME" + toolSyslogTag="${SCRIPT_NAME}-$seq_profileName" } step_1_info() { @@ -30,7 +30,7 @@ step_1_info() { if contextHelp ; then echo -n "selected profile" else - echo -n "profile: $SEQ_PROFILE_NAME" + echo -n "profile: $seq_profileName" fi echo " [OPTIONS] [full|incremental]" echoinfo " [OPTIONS]" @@ -55,7 +55,7 @@ step_1() { done if [ -z $EBU_TARGET ] || [ -z $EBU_SOURCE ] ; then - echo " [I] Nothing to do. Check $SEQ_CONFIG_FILE" + echo " [I] Nothing to do. Check $seq_configFile" return 1 fi @@ -66,7 +66,7 @@ step_1() { return 1 fi - echo " [I] Running backup profile [$SEQ_PROFILE_NAME]" + echo " [I] Running backup profile [$seq_profileName]" if [ "${dupArgs[0]}" != "full" ] && [ ! -z "$EBU_MAX_FULLBKP_AGE" ] ; then dupArgs+=(--full-if-older-than "$EBU_MAX_FULLBKP_AGE") @@ -94,7 +94,7 @@ step_3() { shift if [ -z $EBU_TARGET ] || [ -z $EBU_SOURCE ] ; then - echo " [I] Nothing to do. Check $SEQ_CONFIG_FILE" + echo " [I] Nothing to do. Check $seq_configFile" return 1 fi @@ -185,7 +185,7 @@ step_20_info() { elif [ ! -z "$1" ]; then echo "Status of target: $ebuTarget" else - echo "Status of profile \"$SEQ_PROFILE_NAME\" target: $ebuTarget" + echo "Status of profile \"$seq_profileName\" target: $ebuTarget" fi } step_20_alias() { echo 'status'; } @@ -219,7 +219,7 @@ step_70_info() { if contextHelp ; then echo -n "selected profile" else - echo -n "profile: $SEQ_PROFILE_NAME" + echo -n "profile: $seq_profileName" fi echo " [OPTIONS]" echoinfo " [OPTIONS]" @@ -230,9 +230,9 @@ step_70() { shift local arg local cronRemove=0 - local cronScript="$toolCronDir/${toolPrefix}$SEQ_PROFILE_NAME" + local cronScript="$toolCronDir/${toolPrefix}$seq_profileName" local cronLog='>/dev/null' - local cronEntry="$EBU_CRONTIME $(whoami) $WDIR/$(basename -- $0) -qq -p $SEQ_PROFILE_NAME" + local cronEntry="$EBU_CRONTIME $(whoami) $WDIR/$(basename -- $0) -qq -p $seq_profileName" for arg in "$@" ; do case "$1" in @@ -244,7 +244,7 @@ step_70() { done if [ ! -z "$EBU_LOG_DIR" ] ; then - cronLog="$EBU_LOG_DIR/${toolPrefix}${SEQ_PROFILE_NAME}.log" + cronLog="$EBU_LOG_DIR/${toolPrefix}${seq_profileName}.log" exe touch "$cronLog" exe chmod 600 "$cronLog" fi @@ -252,16 +252,16 @@ step_70() { cronEntry+=" >$cronLog" if [ -z "$EBU_CRONTIME" ] || [ $cronRemove -ne 0 ] ; then - echo " [I] Removing cron for profile $SEQ_PROFILE_NAME" + echo " [I] Removing cron for profile $seq_profileName" exe rm -r "$cronScript" else checkFileHead "$cronScript" "$cronEntry" if [ $? -ne 0 ] ; then - echo " [I] Update cron for profile $SEQ_PROFILE_NAME" + echo " [I] Update cron for profile $seq_profileName" exep "sudo echo \"$cronEntry\" > \"$cronScript\"" syslogEntry "Cron file update complete [$EBU_CRONTIME]" else - echo " [I] Cron for profile $SEQ_PROFILE_NAME is up to date" + echo " [I] Cron for profile $seq_profileName is up to date" fi fi } @@ -269,9 +269,9 @@ step_70() { step_72_info() { echo "Update all profile cron files"; } step_72_alias() { echo "reload"; } step_72() { - for seq in "$SEQ_CONFIG_HOME/"* ; do + for seq in "$seq_configRoot/"* ; do seq=$(basename ${seq}) - $WDIR/$(basename -- $0) $SEQUENCER_ARGS -qq -p ${seq%%.*} cron + $WDIR/$(basename -- $0) $sqr_args -qq -p ${seq%%.*} cron done } diff --git a/seqs/matrix.sh b/seqs/matrix.sh index 00eaa69..10ab812 100755 --- a/seqs/matrix.sh +++ b/seqs/matrix.sh @@ -211,7 +211,7 @@ step_16_info() { step_16_alias() { echo "listuser"; } step_16() { adminTokenCheck - endReturn -o $? "Admin token needed. Check $SEQ_CONFIG_FILE" + endReturn -o $? "Admin token needed. Check $seq_configFile" shift local synapseIP=localhost @@ -280,7 +280,7 @@ step_22_info() { step_22_alias() { echo "listrooms"; } step_22() { adminTokenCheck - endReturn -o $? "Admin token needed. Check $SEQ_CONFIG_FILE" + endReturn -o $? "Admin token needed. Check $seq_configFile" shift local arg @@ -316,7 +316,7 @@ step_24_info() { step_24_alias() { echo "listmember"; } step_24() { adminTokenCheck - endReturn -o $? "Admin token needed. Check $SEQ_CONFIG_FILE" + endReturn -o $? "Admin token needed. Check $seq_configFile" shift local roomId="" @@ -356,7 +356,7 @@ step_26_info() { step_26_alias() { echo "purge"; } step_26() { adminTokenCheck - endReturn -o $? "Admin token needed. Check $SEQ_CONFIG_FILE" + endReturn -o $? "Admin token needed. Check $seq_configFile" shift local i @@ -387,7 +387,7 @@ step_28_info() { step_28_alias() { echo "deleteroom"; } step_28() { adminTokenCheck - endReturn -o $? "Admin token needed. Check $SEQ_CONFIG_FILE" + endReturn -o $? "Admin token needed. Check $seq_configFile" shift local roomId="" @@ -514,7 +514,7 @@ step_56() { echo " [I] Transfer both backup files to target server" echo echo " [I] Install $toolName on the target server up to step \"virtualenv\"" - echo " (Stop after first run and edit $SEQ_CONFIG_FILE)" + echo " (Stop after first run and edit $seq_configFile)" echo " ./matrix.sh install" echo " cd ${MATRIX_HOME}" echo " tar xf ...synapse_bu.tar.gz" diff --git a/sequpgrade.sh b/sequpgrade.sh index 686ba78..00cb973 100755 --- a/sequpgrade.sh +++ b/sequpgrade.sh @@ -76,11 +76,11 @@ makechanges() { exe sed ${inplace} 's/^[[:space:]]*step_config/seq_config/'${sedprint} "${file}" exe sed ${inplace} 's/^\(step_.*_alias\)()[[:space:]]*{[[:space:]]*ALIAS=/\1() { echo /'${sedprint} "${file}" - exe sed ${inplace} 's/^SEQUENCER_ARGS/sqr_args/'${sedprint} "${file}" - exe sed ${inplace} 's/^STEP_ARGS/seq_args/'${sedprint} "${file}" - exe sed ${inplace} 's/^SEQ_CONFIG_HOME/seq_configRoot/'${sedprint} "${file}" - exe sed ${inplace} 's/^SEQ_CONFIG_FILE/seq_configFile/'${sedprint} "${file}" - exe sed ${inplace} 's/^SEQ_PROFILE_NAME/seq_profileName/'${sedprint} "${file}" + exe sed ${inplace} 's/SEQUENCER_ARGS/sqr_args/'${sedprint} "${file}" + exe sed ${inplace} 's/STEP_ARGS/seq_args/'${sedprint} "${file}" + exe sed ${inplace} 's/SEQ_CONFIG_HOME/seq_configRoot/'${sedprint} "${file}" + exe sed ${inplace} 's/SEQ_CONFIG_FILE/seq_configFile/'${sedprint} "${file}" + exe sed ${inplace} 's/SEQ_PROFILE_NAME/seq_profileName/'${sedprint} "${file}" exe sed ${inplace} 's/^VERSION_SEQREV.*/readonly sqr_minVersion=16/'${sedprint} "${file}" done }