mirror of
https://github.com/LamGC/quickly-conf-sshd.git
synced 2025-04-30 06:37:35 +00:00
为 cron 定时执行添加日志.
This commit is contained in:
parent
0d4e1368fd
commit
75501d82a1
@ -7,7 +7,7 @@ const backupSshKeys = ``;
|
|||||||
// Worker 的访问地址, 如果不填的话默认为请求的地址, 填了就会用这里的地址(要去 Worker 的触发器那绑定, 否则无效).
|
// Worker 的访问地址, 如果不填的话默认为请求的地址, 填了就会用这里的地址(要去 Worker 的触发器那绑定, 否则无效).
|
||||||
const defaultBaseUrl = "";
|
const defaultBaseUrl = "";
|
||||||
// Cron 表达式, 默认 1 天执行一次更新.
|
// Cron 表达式, 默认 1 天执行一次更新.
|
||||||
const cronExpression = "0 0 0 * * ?";
|
const cronExpression = "0 0 * * *";
|
||||||
|
|
||||||
// 下面的东西一般不用改.
|
// 下面的东西一般不用改.
|
||||||
const baseRepoPageUrl = `https://${githubUserName.toLowerCase()}.github.io/${githubInstSshProjectName}/`;
|
const baseRepoPageUrl = `https://${githubUserName.toLowerCase()}.github.io/${githubInstSshProjectName}/`;
|
||||||
|
@ -212,6 +212,6 @@ if [ $(has_param "-c" "--cron") == "true" ]; then
|
|||||||
chmod +x ~/.conf-sshd/conf-sshd.sh
|
chmod +x ~/.conf-sshd/conf-sshd.sh
|
||||||
echo "Install conf-sshd script successfully."
|
echo "Install conf-sshd script successfully."
|
||||||
# 将当前脚本添加到 Crontab 中
|
# 将当前脚本添加到 Crontab 中
|
||||||
echo "$cron /bin/bash ~/.conf-sshd/conf-sshd.sh -o -k $sshkey_url" | crontab -
|
echo "$cron /bin/bash ~/.conf-sshd/conf-sshd.sh -o -k $sshkey_url >> ~/.conf-sshd/run.log" | crontab -
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user