mirror of
https://git.hackfreedom.org/mesh.cat/get-certs.git
synced 2026-05-22 06:23:25 +00:00
remove temp file, enable logs
This commit is contained in:
+6
-4
@@ -90,7 +90,7 @@ if [ ! -e "$HOME/.acme.sh/acme.sh" ]; then
|
||||
fi
|
||||
|
||||
# define acme.sh command
|
||||
acme_cmd="$HOME/.acme.sh/acme.sh"
|
||||
acme_cmd="$HOME/.acme.sh/acme.sh --log"
|
||||
if [ "$proxychains" = true ] ; then
|
||||
if _exists proxychains ; then
|
||||
acme_cmd="proxychains -q $acme_cmd"
|
||||
@@ -111,7 +111,7 @@ timestamp=`date +"%Y%m%d%H%M%S"`
|
||||
long_flag="--yes-I-know-dns-manual-mode-enough-go-ahead-please"
|
||||
challenge_file=$twd/acme_challenge.$timestamp.txt
|
||||
$acme_cmd --issue \
|
||||
-d $domain \
|
||||
-d "$domain" \
|
||||
--dns $long_flag \
|
||||
> $challenge_file
|
||||
cat $challenge_file
|
||||
@@ -124,7 +124,7 @@ echo TXT value is $txt_value
|
||||
echo ""
|
||||
|
||||
# launch dnsmasq
|
||||
touch /tmp/dnsm.tmp.cnf \
|
||||
touch $twd/dnsm.tmp.cnf \
|
||||
&& dnsmasq \
|
||||
--conf-file=/tmp/dnsm.tmp.cnf \
|
||||
-k -d -D -b -R -n -h -q \
|
||||
@@ -137,12 +137,14 @@ sleep 5
|
||||
|
||||
# issue certificate
|
||||
$acme_cmd --renew \
|
||||
-d $domain \
|
||||
-d "$domain" \
|
||||
--dns $long_flag
|
||||
|
||||
# kill dnsmasq
|
||||
kill $dnsmasq_pid
|
||||
|
||||
rm $twd/dnsm.tmp.cnf
|
||||
|
||||
echo "Job finished."
|
||||
echo "Remember to create a cron job to run this script once a month."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user