testing: Move removal of charon.pid into posttest section

Fixes: a103f3a2849f ("testing: Add options to only run pre- or posttest scripts of a scenario")
This commit is contained in:
Tobias Brunner 2025-03-21 15:12:06 +01:00
parent 08428f6b5d
commit 02c43fa6e4

View File

@ -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
#