diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index bce1596..15b5e6d 100644 --- a/dev/ofunctions.sh +++ b/dev/ofunctions.sh @@ -31,7 +31,7 @@ #### OFUNCTIONS MINI SUBSET #### #### OFUNCTIONS MICRO SUBSET #### _OFUNCTIONS_VERSION=2.3.0-dev-postRC2 -_OFUNCTIONS_BUILD=2019070504 +_OFUNCTIONS_BUILD=20190701901 #### _OFUNCTIONS_BOOTSTRAP SUBSET #### _OFUNCTIONS_BOOTSTRAP=true #### _OFUNCTIONS_BOOTSTRAP SUBSET END #### @@ -423,6 +423,11 @@ function KillAllChilds { #### CleanUp SUBSET #### function CleanUp { + # Exit controlmaster before it's socket gets deleted + if [ "$SSH_CONTROLMASTER" == true ] && [ "$SSH_CMD" != "" ]; then + $SSH_CMD -O exit + fi + if [ "$_DEBUG" != true ]; then # Removing optional remote $RUN_DIR that goes into local $RUN_DIR if [ -d "$RUN_DIR/$PROGRAM.remote.$SCRIPT_PID.$TSTAMP" ]; then @@ -433,10 +438,6 @@ function CleanUp { # Fix for sed -i requiring backup extension for BSD & Mac (see all sed -i statements) rm -f "$RUN_DIR/$PROGRAM."*".$SCRIPT_PID.$TSTAMP.tmp" fi - - if [ "$SSH_CONTROLMASTER" == true ] && [ "$SSH_CMD" != "" ]; then - $SSH_CMD -O exit - fi } #### CleanUp SUBSET END ####