2
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
#!/usr/bin/env sh
|
||||
set -eu
|
||||
|
||||
# 卸载 scripts/install-renew-cron.sh 安装的证书自动续期定时任务。
|
||||
# 只删除固定标记之间的内容,不影响其它 crontab 任务。
|
||||
# Remove the cron block installed by scripts/install-renew-cron.sh.
|
||||
|
||||
MARK_BEGIN="# BEGIN openresty-gateway cert renew"
|
||||
MARK_END="# END openresty-gateway cert renew"
|
||||
|
||||
if ! command -v crontab >/dev/null 2>&1; then
|
||||
echo "错误:缺少 crontab 命令。" >&2
|
||||
echo "Error: crontab is required." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -18,4 +17,4 @@ trap 'rm -f "$tmp_file"' EXIT
|
||||
crontab -l 2>/dev/null | sed "/$MARK_BEGIN/,/$MARK_END/d" > "$tmp_file"
|
||||
crontab "$tmp_file"
|
||||
|
||||
echo "已卸载证书续期 cron。"
|
||||
echo "Uninstalled certificate renewal cron."
|
||||
|
||||
Reference in New Issue
Block a user