修复重复添加cron的问题

pull/315/head
wulabing 2020-06-04 14:59:47 +08:00
parent 88134c9540
commit 090bd04025
1 changed files with 10 additions and 8 deletions

View File

@ -616,6 +616,7 @@ nginx_process_disabled() {
#} #}
acme_cron_update() { acme_cron_update() {
wget -N -P /usr/bin --no-check-certificate "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/dev/ssl_update.sh" wget -N -P /usr/bin --no-check-certificate "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/dev/ssl_update.sh"
if [[ $(crontab -l | grep -c "ssl_update.sh") -lt 1 ]]; then
if [[ "${ID}" == "centos" ]]; then if [[ "${ID}" == "centos" ]]; then
# sed -i "/acme.sh/c 0 3 * * 0 \"/root/.acme.sh\"/acme.sh --cron --home \"/root/.acme.sh\" \ # sed -i "/acme.sh/c 0 3 * * 0 \"/root/.acme.sh\"/acme.sh --cron --home \"/root/.acme.sh\" \
# &> /dev/null" /var/spool/cron/root # &> /dev/null" /var/spool/cron/root
@ -625,6 +626,7 @@ acme_cron_update() {
# &> /dev/null" /var/spool/cron/crontabs/root # &> /dev/null" /var/spool/cron/crontabs/root
sed -i "/acme.sh/c 0 3 * * 0 bash ${ssl_update_file}" /var/spool/cron/crontabs/root sed -i "/acme.sh/c 0 3 * * 0 bash ${ssl_update_file}" /var/spool/cron/crontabs/root
fi fi
fi
judge "cron 计划任务更新" judge "cron 计划任务更新"
} }