Commit 090bd04 1 parent 88134c9 commit 090bd04 Copy full SHA for 090bd04
File tree 1 file changed +10
-8
lines changed
1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -616,14 +616,16 @@ nginx_process_disabled() {
616
616
# }
617
617
acme_cron_update () {
618
618
wget -N -P /usr/bin --no-check-certificate " https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/dev/ssl_update.sh"
619
- if [[ " ${ID} " == " centos" ]]; then
620
- # sed -i "/acme.sh/c 0 3 * * 0 \"/root/.acme.sh\"/acme.sh --cron --home \"/root/.acme.sh\" \
621
- # &> /dev/null" /var/spool/cron/root
622
- sed -i " /acme.sh/c 0 3 * * 0 bash ${ssl_update_file} " /var/spool/cron/root
623
- else
624
- # sed -i "/acme.sh/c 0 3 * * 0 \"/root/.acme.sh\"/acme.sh --cron --home \"/root/.acme.sh\" \
625
- # &> /dev/null" /var/spool/cron/crontabs/root
626
- sed -i " /acme.sh/c 0 3 * * 0 bash ${ssl_update_file} " /var/spool/cron/crontabs/root
619
+ if [[ $( crontab -l | grep -c " ssl_update.sh" ) -lt 1 ]]; then
620
+ if [[ " ${ID} " == " centos" ]]; then
621
+ # sed -i "/acme.sh/c 0 3 * * 0 \"/root/.acme.sh\"/acme.sh --cron --home \"/root/.acme.sh\" \
622
+ # &> /dev/null" /var/spool/cron/root
623
+ sed -i " /acme.sh/c 0 3 * * 0 bash ${ssl_update_file} " /var/spool/cron/root
624
+ else
625
+ # sed -i "/acme.sh/c 0 3 * * 0 \"/root/.acme.sh\"/acme.sh --cron --home \"/root/.acme.sh\" \
626
+ # &> /dev/null" /var/spool/cron/crontabs/root
627
+ sed -i " /acme.sh/c 0 3 * * 0 bash ${ssl_update_file} " /var/spool/cron/crontabs/root
628
+ fi
627
629
fi
628
630
judge " cron 计划任务更新"
629
631
}
You can’t perform that action at this time.
0 commit comments