diff --git a/dev/common_batch.sh b/dev/common_batch.sh index 7b05f8e..1569b4b 100755 --- a/dev/common_batch.sh +++ b/dev/common_batch.sh @@ -3,7 +3,7 @@ SUBPROGRAM=[prgname] PROGRAM="$SUBPROGRAM-batch" # Batch program to run osync / obackup instances sequentially and rerun failed ones AUTHOR="(L) 2013-2020 by Orsiris de Jong" CONTACT="http://www.netpower.fr - ozy@netpower.fr" -PROGRAM_BUILD=2020031501 +PROGRAM_BUILD=2020031502 ## Runs an osync /obackup instance for every conf file found ## If an instance fails, run it again if time permits @@ -38,7 +38,7 @@ fi include #### Logger SUBSET #### include #### CleanUp SUBSET #### -include #### TrapQuit SUBSET #### +include #### GenericTrapQuit SUBSET #### function CheckEnvironment { ## osync / obackup executable full path can be set here if it cannot be found on the system @@ -128,7 +128,7 @@ function Usage { exit 128 } -trap TrapQuit TERM EXIT HUP QUIT +trap GenericTrapQuit TERM EXIT HUP QUIT opts="" for i in "$@" diff --git a/dev/common_install.sh b/dev/common_install.sh index 6f1b30a..6bec72c 100644 --- a/dev/common_install.sh +++ b/dev/common_install.sh @@ -10,7 +10,7 @@ PROGRAM_BINARY=$PROGRAM".sh" PROGRAM_BATCH=$PROGRAM"-batch.sh" SSH_FILTER="ssh_filter.sh" -SCRIPT_BUILD=2020031501 +SCRIPT_BUILD=2020031502 INSTANCE_ID="installer-$SCRIPT_BUILD" ## osync / obackup / pmocr / zsnap install script @@ -40,7 +40,7 @@ include #### UrlEncode SUBSET #### include #### GetLocalOS SUBSET #### include #### GetConfFileValue SUBSET #### include #### CleanUp SUBSET #### -include #### TrapQuit SUBSET #### +include #### GenericTrapQuit SUBSET #### function SetLocalOSSettings { USER=root @@ -397,7 +397,7 @@ SERVICE_FILE_OPENRC="$SERVICE_NAME-openrc" ## Generic code -trap TrapQuit TERM EXIT HUP QUIT +trap GenericTrapQuit TERM EXIT HUP QUIT if [ ! -w "$(dirname $LOG_FILE)" ]; then echo "Cannot write to log [$(dirname $LOG_FILE)]." diff --git a/dev/merge.sh b/dev/merge.sh index 4bc8fa7..4b0140b 100755 --- a/dev/merge.sh +++ b/dev/merge.sh @@ -61,7 +61,7 @@ function __PREPROCESSOR_Constants { '#### SetConfFileValue SUBSET ####' '#### CheckRFC822 SUBSET ####' '#### CleanUp SUBSET ####' - '#### TrapQuit SUBSET ####' + '#### GenericTrapQuit SUBSET ####' '#### FileMove SUBSET ####' ) } diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index dbd48d1..d7a5c96 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -31,7 +31,7 @@ #### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MICRO SUBSET #### _OFUNCTIONS_VERSION=2.3.0-RC4 -_OFUNCTIONS_BUILD=2020031501 +_OFUNCTIONS_BUILD=2020031502 #### _OFUNCTIONS_BOOTSTRAP SUBSET #### _OFUNCTIONS_BOOTSTRAP=true #### _OFUNCTIONS_BOOTSTRAP SUBSET END #### @@ -421,7 +421,7 @@ function KillAllChilds { return $errorcount } -#### TrapQuit SUBSET #### +#### GenericTrapQuit SUBSET #### function GenericTrapQuit { local exitcode=0