diff --git a/acme/acme.sh b/acme/acme.sh index 1033407..0966b2f 100755 --- a/acme/acme.sh +++ b/acme/acme.sh @@ -22,6 +22,8 @@ acme (){ cp /acme.sh/${DOMAIN}/fullchain.cer /ssl/${DOMAIN}.cer cp /acme.sh/${DOMAIN}/${DOMAIN}.key /ssl/${DOMAIN}.key mv /acme.sh/${DOMAIN} /acme.sh/${DOMAIN}-$(date +%Y)-$(date +%m)-$(date +%d)-${RANDOM} + rm -rf /acme.sh/ca + rm -rf /acme.sh/http.header } if [ ! -n "${DOMAIN}" ] ; then @@ -31,5 +33,5 @@ else fi cat >/var/spool/cron/crontabs/root</dev/null 2>&1 +0 0 3 * * /conf/acme.sh >/dev/null 2>&1 EOF diff --git a/acme/start.sh b/acme/start.sh index 5f69d0a..5da613c 100755 --- a/acme/start.sh +++ b/acme/start.sh @@ -14,7 +14,7 @@ DOMAIN=$(cat /conf/account.conf | awk -F= '{if($1~"DOMAIN")print $2}') DNSAPI=$(cat /conf/account.conf | awk -F= '{if($1~"DNSAPI")print $2}') cat >/var/spool/cron/crontabs/root</dev/null 2>&1 +0 0 3 * * /conf/acme.sh >/dev/null 2>&1 EOF if [ ! -f "/ssl/${DOMAIN}.cer" ] && [ -n "${DOMAIN}" ]; then diff --git a/install.sh b/install.sh index 226d635..fb32177 100644 --- a/install.sh +++ b/install.sh @@ -361,6 +361,11 @@ if ! type docker-compose >/dev/null 2>&1 ; then exit 0 fi +if ! type git >/dev/null 2>&1 ; then + echo -e "${Red}本机未安装 git 已退出脚本.${Font}" + exit +fi + if [ -d "${WORK_PATH}/rssforever" ] ; then echo -e "${Green}当前目录存在 rssforever 项目.请更换目录,或删除后再次执行脚本.${Font}" exit 0