]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Move removal of charon.pid into posttest section
authorTobias Brunner <tobias@strongswan.org>
Fri, 21 Mar 2025 14:12:06 +0000 (15:12 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 4 Apr 2025 10:06:59 +0000 (12:06 +0200)
Fixes: a103f3a2849f ("testing: Add options to only run pre- or posttest scripts of a scenario")
testing/do-tests

index 610e1a1699b2a7586f668d68266355be3f2c79c7..e2a60aa63015d6fbbb60664495ce0fac06fa87f6 100755 (executable)
@@ -879,6 +879,16 @@ else
 
        $DIR/scripts/restore-defaults $testname
 
+       ##########################################################################
+       # remove any charon.pid files that still may exist
+       #
+
+       for host in $IPSECHOSTS
+       do
+           eval HOSTLOGIN=root@\$ipv4_${host}
+           ssh $SSHCONF $HOSTLOGIN 'if [ -f /var/run/charon.pid ]; then rm /var/run/charon.pid; echo "    removed charon.pid on `hostname`"; fi'
+       done
+
 fi
 ############################################################################
 
@@ -928,17 +938,6 @@ fi
   </tr>
 @EOF
 
-
-       ##########################################################################
-       # remove any charon.pid files that still may exist
-       #
-
-       for host in $IPSECHOSTS
-       do
-           eval HOSTLOGIN=root@\$ipv4_${host}
-           ssh $SSHCONF $HOSTLOGIN 'if [ -f /var/run/charon.pid ]; then rm /var/run/charon.pid; echo "    removed charon.pid on `hostname`"; fi'
-       done
-
        ##########################################################################
        # exit if aborted or running only pre-/posttest scripts
        #