mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Add cleanup trap to integration test script (#4075)
The integration test script spins up Python webservers. This trap will ensure that those webservers are shutdown at exit.
This commit is contained in:
parent
ea951150a4
commit
fe358600ab
1 changed files with 12 additions and 0 deletions
|
|
@ -20,6 +20,18 @@ else
|
|||
readlink="readlink"
|
||||
fi
|
||||
|
||||
cleanup_and_exit() {
|
||||
EXIT_STATUS=$?
|
||||
if SERVER_STILL_RUNNING=`ps -p $python_server_pid -o pid=`
|
||||
then
|
||||
echo Kill server subprocess, left running by abnormal exit
|
||||
kill $SERVER_STILL_RUNNING
|
||||
fi
|
||||
exit $EXIT_STATUS
|
||||
}
|
||||
|
||||
trap cleanup_and_exit EXIT
|
||||
|
||||
common_no_force_renew() {
|
||||
certbot_test_no_force_renew \
|
||||
--authenticator standalone \
|
||||
|
|
|
|||
Loading…
Reference in a new issue