From ee36a4b3cb562bb8c4be34490cbd91ed0211f5d9 Mon Sep 17 00:00:00 2001 From: deajan Date: Tue, 23 Jul 2019 10:41:17 +0200 Subject: [PATCH] Updated ofunctions --- dev/ofunctions.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dev/ofunctions.sh b/dev/ofunctions.sh index bce1596..f297f05 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=2019072301 #### _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 ####