From d91360dc1ab0f2275e9c5878324984567075cee2 Mon Sep 17 00:00:00 2001 From: bohung Date: Wed, 24 Aug 2022 18:12:55 +0800 Subject: [PATCH] Change certbot crontab. --- install_certbot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_certbot.sh b/install_certbot.sh index 19d579c..9ad11c0 100644 --- a/install_certbot.sh +++ b/install_certbot.sh @@ -86,7 +86,7 @@ if [ ! -z $certbot_path ]; then certbot_renew_command=$(sudo -p 'sudo password:' crontab -l|grep "certbot"|grep "renew") if [ -z "$certbot_renew_command" ]; then echo "Add certbot renew cronjob!" - certbot_renew_command="30 2 * * 1 $certbot_path renew --no-self-upgrade --post-hook 'sudo service nginx restart' > /var/log/le-renew.log" + certbot_renew_command="30 2 * * * $certbot_path renew --no-self-upgrade --renew-hook 'sudo service nginx restart' > /var/log/le-renew.log" echo "$certbot_renew_command" CRON="$certbot_renew_command" && (sudo -p 'sudo password:' crontab -l; echo "$CRON" ) | sudo -p 'sudo password:' crontab - fi