Renamed ofunctions TrapQuit to GeneralTrapQuit

pull/194/head
root 4 years ago
parent 6edce242b0
commit fbce80bc0a

@ -3,7 +3,7 @@ SUBPROGRAM=[prgname]
PROGRAM="$SUBPROGRAM-batch" # Batch program to run osync / obackup instances sequentially and rerun failed ones PROGRAM="$SUBPROGRAM-batch" # Batch program to run osync / obackup instances sequentially and rerun failed ones
AUTHOR="(L) 2013-2020 by Orsiris de Jong" AUTHOR="(L) 2013-2020 by Orsiris de Jong"
CONTACT="http://www.netpower.fr - ozy@netpower.fr" CONTACT="http://www.netpower.fr - ozy@netpower.fr"
PROGRAM_BUILD=2020031501 PROGRAM_BUILD=2020031502
## Runs an osync /obackup instance for every conf file found ## Runs an osync /obackup instance for every conf file found
## If an instance fails, run it again if time permits ## If an instance fails, run it again if time permits
@ -38,7 +38,7 @@ fi
include #### Logger SUBSET #### include #### Logger SUBSET ####
include #### CleanUp SUBSET #### include #### CleanUp SUBSET ####
include #### TrapQuit SUBSET #### include #### GenericTrapQuit SUBSET ####
function CheckEnvironment { function CheckEnvironment {
## osync / obackup executable full path can be set here if it cannot be found on the system ## 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 exit 128
} }
trap TrapQuit TERM EXIT HUP QUIT trap GenericTrapQuit TERM EXIT HUP QUIT
opts="" opts=""
for i in "$@" for i in "$@"

@ -10,7 +10,7 @@ PROGRAM_BINARY=$PROGRAM".sh"
PROGRAM_BATCH=$PROGRAM"-batch.sh" PROGRAM_BATCH=$PROGRAM"-batch.sh"
SSH_FILTER="ssh_filter.sh" SSH_FILTER="ssh_filter.sh"
SCRIPT_BUILD=2020031501 SCRIPT_BUILD=2020031502
INSTANCE_ID="installer-$SCRIPT_BUILD" INSTANCE_ID="installer-$SCRIPT_BUILD"
## osync / obackup / pmocr / zsnap install script ## osync / obackup / pmocr / zsnap install script
@ -40,7 +40,7 @@ include #### UrlEncode SUBSET ####
include #### GetLocalOS SUBSET #### include #### GetLocalOS SUBSET ####
include #### GetConfFileValue SUBSET #### include #### GetConfFileValue SUBSET ####
include #### CleanUp SUBSET #### include #### CleanUp SUBSET ####
include #### TrapQuit SUBSET #### include #### GenericTrapQuit SUBSET ####
function SetLocalOSSettings { function SetLocalOSSettings {
USER=root USER=root
@ -397,7 +397,7 @@ SERVICE_FILE_OPENRC="$SERVICE_NAME-openrc"
## Generic code ## Generic code
trap TrapQuit TERM EXIT HUP QUIT trap GenericTrapQuit TERM EXIT HUP QUIT
if [ ! -w "$(dirname $LOG_FILE)" ]; then if [ ! -w "$(dirname $LOG_FILE)" ]; then
echo "Cannot write to log [$(dirname $LOG_FILE)]." echo "Cannot write to log [$(dirname $LOG_FILE)]."

@ -61,7 +61,7 @@ function __PREPROCESSOR_Constants {
'#### SetConfFileValue SUBSET ####' '#### SetConfFileValue SUBSET ####'
'#### CheckRFC822 SUBSET ####' '#### CheckRFC822 SUBSET ####'
'#### CleanUp SUBSET ####' '#### CleanUp SUBSET ####'
'#### TrapQuit SUBSET ####' '#### GenericTrapQuit SUBSET ####'
'#### FileMove SUBSET ####' '#### FileMove SUBSET ####'
) )
} }

@ -31,7 +31,7 @@
#### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MINI SUBSET ####
#### OFUNCTIONS MICRO SUBSET #### #### OFUNCTIONS MICRO SUBSET ####
_OFUNCTIONS_VERSION=2.3.0-RC4 _OFUNCTIONS_VERSION=2.3.0-RC4
_OFUNCTIONS_BUILD=2020031501 _OFUNCTIONS_BUILD=2020031502
#### _OFUNCTIONS_BOOTSTRAP SUBSET #### #### _OFUNCTIONS_BOOTSTRAP SUBSET ####
_OFUNCTIONS_BOOTSTRAP=true _OFUNCTIONS_BOOTSTRAP=true
#### _OFUNCTIONS_BOOTSTRAP SUBSET END #### #### _OFUNCTIONS_BOOTSTRAP SUBSET END ####
@ -421,7 +421,7 @@ function KillAllChilds {
return $errorcount return $errorcount
} }
#### TrapQuit SUBSET #### #### GenericTrapQuit SUBSET ####
function GenericTrapQuit { function GenericTrapQuit {
local exitcode=0 local exitcode=0

Loading…
Cancel
Save