Update le-cloudxns.sh

This commit is contained in:
tianyu 2016-02-02 13:07:01 +08:00
parent d04d9d2f9a
commit e537108958
1 changed files with 18 additions and 1 deletions

View File

@ -1,5 +1,7 @@
#!/bin/bash
export CONFIG=$1
if [ ! -f "$CONFIG" ];then
echo "ERROR, CONFIG NOT EXIST."
exit 1
@ -7,6 +9,21 @@ fi
. $CONFIG
echo $DOMAINS > domains.txt
echo "$CERT_DOMAINS" > domains.txt
if [ ! -f "cloudxns.sh" ];then
wget https://github.com/xdtianyu/scripts/raw/master/le-dns/cloudxns.sh -O cloudxns.sh -o /dev/null
chmod +x cloudxns.sh
fi
if [ ! -f "cloudxns-hook.sh" ];then
wget https://github.com/xdtianyu/scripts/raw/master/le-dns/cloudxns-hook.sh -O cloudxns-hook.sh -o /dev/null
chmod +x cloudxns-hook.sh
fi
if [ ! -f "letsencrypt.sh" ];then
wget https://github.com/lukas2511/letsencrypt.sh/raw/master/letsencrypt.sh -O letsencrypt.sh -o /dev/null
chmod +x letsencrypt.sh
fi
./letsencrypt.sh -c -k ./cloudxns-hook.sh -t dns-01