From 499874a4b1e0cdd288c50c54e5c50a5e8e9f5316 Mon Sep 17 00:00:00 2001 From: cynic Date: Mon, 19 Aug 2024 04:05:04 +0000 Subject: [PATCH] let dnsmasq processes running after script execution --- get-certs.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/get-certs.sh b/get-certs.sh index ddfd789..200176e 100755 --- a/get-certs.sh +++ b/get-certs.sh @@ -151,8 +151,14 @@ else exit 1 fi +# prepare to launche dnsmasq tmp_conf_file=$twd/dnsmasq.$USER.tmp.cnf +# clean dnsmasq processes +for p in `ps | grep dnsmasq.*.tmp.cnf | grep -v grep | awk '{print $1}'` ; do + kill $p ; +done + # launch acme challenge dnsmasq process touch $tmp_conf_file \ && dnsmasq \ @@ -193,14 +199,12 @@ echo "Waiting for $wait_before_renew seconds." sleep $wait_before_renew # issue certificate +export MAX_RETRY_TIMES=40 $acme_cmd --renew --server $tls_provider \ -d "$domain" \ --dns $long_flag acme_renew_state=$? -# kill acme challenge dnsmasq process -kill $acme_dnsmasq_pid - rm $tmp_conf_file echo ""