fix file
This commit is contained in:
16
trojan.sh
16
trojan.sh
@@ -78,9 +78,9 @@ EOF
|
|||||||
red "不存在/usr/src/trojan-cert/$your_domain目录"
|
red "不存在/usr/src/trojan-cert/$your_domain目录"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
/root/.acme.sh/acme.sh --register-account -m myemail@example.com --server zerossl
|
/root/.acme.sh/acme.sh --register-account -m cert@gamesme.me --server zerossl
|
||||||
/root/.acme.sh/acme.sh --issue -d $your_domain --nginx --ecc
|
/root/.acme.sh/acme.sh --issue -d $your_domain --nginx --ecc
|
||||||
if test -s /root/.acme.sh/$your_domain_ecc/fullchain.cer; then
|
if test -s /root/.acme.sh/${your_domain}_ecc/fullchain.cer; then
|
||||||
cert_success="1"
|
cert_success="1"
|
||||||
fi
|
fi
|
||||||
elif [ -f "/usr/src/trojan-cert/$your_domain/fullchain.cer" ]; then
|
elif [ -f "/usr/src/trojan-cert/$your_domain/fullchain.cer" ]; then
|
||||||
@@ -89,9 +89,9 @@ EOF
|
|||||||
now_time=`date +%s`
|
now_time=`date +%s`
|
||||||
minus=$(($now_time - $create_time ))
|
minus=$(($now_time - $create_time ))
|
||||||
if [ $minus -gt 5184000 ]; then
|
if [ $minus -gt 5184000 ]; then
|
||||||
/root/.acme.sh/acme.sh --register-account -m myemail@example.com --server zerossl
|
/root/.acme.sh/acme.sh --register-account -m cert@gamesme.me --server zerossl
|
||||||
/root/.acme.sh/acme.sh --issue -d $your_domain --nginx --ecc
|
/root/.acme.sh/acme.sh --issue -d $your_domain --nginx --ecc
|
||||||
if test -s /root/.acme.sh/$your_domain_ecc/fullchain.cer; then
|
if test -s /root/.acme.sh/${your_domain}_ecc/fullchain.cer; then
|
||||||
cert_success="1"
|
cert_success="1"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -100,9 +100,9 @@ EOF
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
mkdir /usr/src/trojan-cert/$your_domain
|
mkdir /usr/src/trojan-cert/$your_domain
|
||||||
/root/.acme.sh/acme.sh --register-account -m myemail@example.com --server zerossl
|
/root/.acme.sh/acme.sh --register-account -m cert@gamesme.me --server zerossl
|
||||||
/root/.acme.sh/acme.sh --issue -d $your_domain --nginx --ecc
|
/root/.acme.sh/acme.sh --issue -d $your_domain --nginx --ecc
|
||||||
if test -s /root/.acme.sh/$your_domain_ecc/fullchain.cer; then
|
if test -s /root/.acme.sh/${your_domain}_ecc/fullchain.cer; then
|
||||||
cert_success="1"
|
cert_success="1"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@@ -425,7 +425,7 @@ function repair_cert(){
|
|||||||
blue "务必与之前失败使用的域名一致"
|
blue "务必与之前失败使用的域名一致"
|
||||||
green "============================"
|
green "============================"
|
||||||
read your_domain
|
read your_domain
|
||||||
if test -s /root/.acme.sh/$your_domain_ecc/fullchain.cer; then
|
if test -s /root/.acme.sh/${your_domain}_ecc/fullchain.cer; then
|
||||||
green "证书文件存在"
|
green "证书文件存在"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -438,7 +438,7 @@ function repair_cert(){
|
|||||||
now_time=`date +%s`
|
now_time=`date +%s`
|
||||||
minus=$(($now_time - $create_time ))
|
minus=$(($now_time - $create_time ))
|
||||||
if [ $minus -gt 5184000 ]; then
|
if [ $minus -gt 5184000 ]; then
|
||||||
/root/.acme.sh/acme.sh --register-account -m myemail@example.com --server zerossl
|
/root/.acme.sh/acme.sh --register-account -m cert@gamesme.me --server zerossl
|
||||||
/root/.acme.sh/acme.sh --issue -d $your_domain --standalone --ecc
|
/root/.acme.sh/acme.sh --issue -d $your_domain --standalone --ecc
|
||||||
/root/.acme.sh/acme.sh --installcert --ecc -d $your_domain \
|
/root/.acme.sh/acme.sh --installcert --ecc -d $your_domain \
|
||||||
--key-file /usr/src/trojan-cert/$your_domain/private.key \
|
--key-file /usr/src/trojan-cert/$your_domain/private.key \
|
||||||
|
|||||||
Reference in New Issue
Block a user