mirror of
https://github.com/deajan/osync
synced 2024-11-17 09:25:42 +00:00
Moved cleanup function according to new ofunctions
This commit is contained in:
parent
557bfb097d
commit
28a9c908d5
@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
|
|||||||
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
|
||||||
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
|
||||||
PROGRAM_VERSION=1.2-beta3
|
PROGRAM_VERSION=1.2-beta3
|
||||||
PROGRAM_BUILD=2016111703
|
PROGRAM_BUILD=2016111704
|
||||||
IS_STABLE=no
|
IS_STABLE=no
|
||||||
|
|
||||||
# Execution order #__WITH_PARANOIA_DEBUG
|
# Execution order #__WITH_PARANOIA_DEBUG
|
||||||
@ -80,7 +80,6 @@ function TrapQuit {
|
|||||||
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
|
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
|
||||||
RunAfterHook
|
RunAfterHook
|
||||||
fi
|
fi
|
||||||
CleanUp
|
|
||||||
Logger "$PROGRAM finished with errors." "ERROR"
|
Logger "$PROGRAM finished with errors." "ERROR"
|
||||||
if [ "$_DEBUG" != "yes" ]
|
if [ "$_DEBUG" != "yes" ]
|
||||||
then
|
then
|
||||||
@ -94,7 +93,6 @@ function TrapQuit {
|
|||||||
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
|
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
|
||||||
RunAfterHook
|
RunAfterHook
|
||||||
fi
|
fi
|
||||||
CleanUp
|
|
||||||
Logger "$PROGRAM finished with warnings." "WARN"
|
Logger "$PROGRAM finished with warnings." "WARN"
|
||||||
if [ "$_DEBUG" != "yes" ]
|
if [ "$_DEBUG" != "yes" ]
|
||||||
then
|
then
|
||||||
@ -106,11 +104,11 @@ function TrapQuit {
|
|||||||
else
|
else
|
||||||
UnlockReplicas
|
UnlockReplicas
|
||||||
RunAfterHook
|
RunAfterHook
|
||||||
CleanUp
|
|
||||||
Logger "$PROGRAM finished." "NOTICE"
|
Logger "$PROGRAM finished." "NOTICE"
|
||||||
exitcode=0
|
exitcode=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CleanUp
|
||||||
KillChilds $$ > /dev/null 2>&1
|
KillChilds $$ > /dev/null 2>&1
|
||||||
|
|
||||||
exit $exitcode
|
exit $exitcode
|
||||||
|
Loading…
Reference in New Issue
Block a user