let dnsmasq processes running after script execution
This commit is contained in:
parent
7d4c257bf4
commit
499874a4b1
10
get-certs.sh
10
get-certs.sh
@ -151,8 +151,14 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# prepare to launche dnsmasq
|
||||||
tmp_conf_file=$twd/dnsmasq.$USER.tmp.cnf
|
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
|
# launch acme challenge dnsmasq process
|
||||||
touch $tmp_conf_file \
|
touch $tmp_conf_file \
|
||||||
&& dnsmasq \
|
&& dnsmasq \
|
||||||
@ -193,14 +199,12 @@ echo "Waiting for $wait_before_renew seconds."
|
|||||||
sleep $wait_before_renew
|
sleep $wait_before_renew
|
||||||
|
|
||||||
# issue certificate
|
# issue certificate
|
||||||
|
export MAX_RETRY_TIMES=40
|
||||||
$acme_cmd --renew --server $tls_provider \
|
$acme_cmd --renew --server $tls_provider \
|
||||||
-d "$domain" \
|
-d "$domain" \
|
||||||
--dns $long_flag
|
--dns $long_flag
|
||||||
acme_renew_state=$?
|
acme_renew_state=$?
|
||||||
|
|
||||||
# kill acme challenge dnsmasq process
|
|
||||||
kill $acme_dnsmasq_pid
|
|
||||||
|
|
||||||
rm $tmp_conf_file
|
rm $tmp_conf_file
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
Reference in New Issue
Block a user