如题,Let’s Encrypt 3个月的证书到期后,crontab 中也有自动添加了续签命令,但是无法续签。
手动运行后,提示如下。
手动运行后,提示如下。
[root@bogon ~]# /usr/local/python/bin/certbot renew --renew-hook
usage:
certbot [SUBCOMMAND] [options] [-d domain] [-d domain] ...
Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
cert. Major SUBCOMMANDS are:
(default) run Obtain & install a cert in your current webserver
certonly Obtain cert, but do not install it (aka "auth")
install Install a previously obtained cert in a server
renew Renew previously obtained certs that are near expiry
revoke Revoke a previously obtained certificate
register Perform tasks related to registering with the CA
rollback Rollback server configuration changes made during install
config_changes Show changes made to server config during installation
plugins Display information about installed plugins
certbot: error: argument --renew-hook: expected one argument
crontab 中如下:
*/20 * * * * /usr/sbin/ntpdate pool.ntp.org > /dev/null 2>&1
0 0 1 * * /usr/local/python/bin/certbot renew --renew-hook "/etc/init.d/nginx reload"
0 4 * * * cd ~/oneinstack;./backup.sh > /dev/null 2>&1 &
7 Answers
/data/oneinstack/letsencrypt/letsencrypt-auto certonly --renew-by-default --webroot -w /data/wwwroot/www.blog-andy.com/ -d blog-andy.com -d http://www.blog-andy.com >/dev/null
/etc/init.d/nginx reload
我把上面这两个写成脚本,放在crontab里,每两月执行一次,是可以的。你把对应的路径改一下,域名换成你自己的就可以了。
/etc/init.d/nginx reload
我把上面这两个写成脚本,放在crontab里,每两月执行一次,是可以的。你把对应的路径改一下,域名换成你自己的就可以了。
执行如下命令,强制更新试试:
/usr/local/python/bin/certbot renew --force-renewal --renew-hook "/etc/init.d/nginx reload"
Please login or Register to submit your answer