Change certbot crontab.
This commit is contained in:
parent
d904eed23b
commit
d91360dc1a
|
@ -86,7 +86,7 @@ if [ ! -z $certbot_path ]; then
|
||||||
certbot_renew_command=$(sudo -p 'sudo password:' crontab -l|grep "certbot"|grep "renew")
|
certbot_renew_command=$(sudo -p 'sudo password:' crontab -l|grep "certbot"|grep "renew")
|
||||||
if [ -z "$certbot_renew_command" ]; then
|
if [ -z "$certbot_renew_command" ]; then
|
||||||
echo "Add certbot renew cronjob!"
|
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"
|
echo "$certbot_renew_command"
|
||||||
CRON="$certbot_renew_command" && (sudo -p 'sudo password:' crontab -l; echo "$CRON" ) | sudo -p 'sudo password:' crontab -
|
CRON="$certbot_renew_command" && (sudo -p 'sudo password:' crontab -l; echo "$CRON" ) | sudo -p 'sudo password:' crontab -
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue