acme.sh 定时SSL自动续期脚本一不小心给删除了,如何添加回来?

问答中心分类: OneinStackacme.sh 定时SSL自动续期脚本一不小心给删除了,如何添加回来?
6293092 asked 4 年 ago

acme.sh中的 定时SSL自动续期脚本一不小心给删除了,如何添加回来? 还有如何修改这些任务 我查crontab -l命令时: 0 1 * * * cd ~/oneinstack;./backup.sh > /dev/null 2>&1 &
0 * * * * cd ~/oneinstack;./backup.sh > /dev/null 2>&1 &
30 2 * * 1 /usr/local/python/bin/certbot renew --renew-hook "/etc/init.d/nginx reload"
0 3 * * * cd ~/oneinstack;service nginx restart > /dev/null 2>&1 &   acme.sh这个任务不见了,如何添加回来? 还有,我直接 输入# "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" --force 提示错误:-bash: /root/.acme.sh/acme.sh: No such file or directory 输入:# /root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh -bash: /root/.acme.sh/acme.sh --cron --home /root/.acme.sh: No such file or directory  

 

/var/spool/cron/root 文件中,没有发现在有这个命令

我直接打开这个文件,添加这个

43 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null

到ROOT文件中,请问如何让这些命令马上运行一次呢?

# "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" --force

是这样子?提示错误:-bash: /root/.acme.sh/acme.sh: No such file or directory

# /root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" --force

这样子输入?

1 Answers
oneinstack answered 4 年 ago

安装如下命令:
curl https://get.acme.sh | sh
acme.sh配置文件丢了没办法,手工删除配置文件/usr/local/nginx/conf/vhost/www.example.com.conf 重新vhost.sh绑定试试