Fixed RunAfterHook double execution

This commit is contained in:
deajan 2016-08-22 10:29:56 +02:00
parent f70d8cda6a
commit ef3153cbcd
2 changed files with 3 additions and 5 deletions

View File

@ -8,6 +8,7 @@ RECENT CHANGES
--------------
XX xxx 2016: osync v1.1.2 released
- Fixed RunAfterHook may be executed twice
- Fixed soft deletion when SUDO_EXEC is enabled
06 Aug 2016: osync v1.1.1 released

View File

@ -4,7 +4,7 @@ PROGRAM="osync" # Rsync based two way sync engine with fault tolerance
AUTHOR="(C) 2013-2016 by Orsiris de Jong"
CONTACT="http://www.netpower.fr/osync - ozy@netpower.fr"
PROGRAM_VERSION=1.1.2
PROGRAM_BUILD=20160801301
PROGRAM_BUILD=20160802201
IS_STABLE=yes
source "./ofunctions.sh"
@ -60,9 +60,7 @@ function TrapQuit {
exitcode=240 # Special exit code for daemon mode not stopping on warnings
else
UnlockReplicas
if [ "$RUN_AFTER_CMD_ON_ERROR" == "yes" ]; then
RunAfterHook
fi
RunAfterHook
CleanUp
Logger "$PROGRAM finished." "NOTICE"
exitcode=0
@ -1777,5 +1775,4 @@ opts="${opts# *}"
if [ $? == 0 ]; then
SoftDelete
fi
RunAfterHook
fi