小编Uri*_*Uri的帖子

certbot 不从 crontab 运行

我从 pip3 安装了 certbot:

# pip3 freeze|grep -i certbot
certbot==1.5.0
certbot-apache==1.5.0
certbot-dns-digitalocean==1.5.0
Run Code Online (Sandbox Code Playgroud)

我可以以 root 身份从命令行运行 certbot,但我将 crontab 配置perl -e 'sleep int(rand(1800))' && certbot -q renew为每周以 root身份运行两次,并通过电子邮件收到此错误消息:

/bin/sh: 1: certbot: not found
Run Code Online (Sandbox Code Playgroud)

如果我whereis certbot在命令行输入,我会得到这个结果:

certbot: /usr/local/bin/certbot
Run Code Online (Sandbox Code Playgroud)

为什么 certbot 不能从 crontab 成功运行?

我正在使用 Ubuntu 18.04。

command-line bash cron 18.04

2
推荐指数
1
解决办法
729
查看次数

标签 统计

18.04 ×1

bash ×1

command-line ×1

cron ×1