mirror of
https://github.com/LamGC/quickly-conf-sshd.git
synced 2025-04-29 14:17:32 +00:00
fix: 修复潜在的 Shell 符号解析问题.
当 Cron 表达式包含 `*` 时, 可能会被解析成文件列表, 因此修复这个问题.
This commit is contained in:
parent
a72e60d80a
commit
b01cb6ff36
@ -197,7 +197,7 @@ if [ $(has_param "-c" "--cron") == "true" ]; then
|
||||
echo "Install conf-sshd script successfully."
|
||||
# 将当前脚本追加到当前用户的 Crontab 中
|
||||
crontab -l > ~/.conf-sshd/crontab.old
|
||||
echo "$cron \"/bin/bash ~/.conf-sshd/conf-sshd.sh -o\" >> ~/.conf-sshd/run.log" >> ~/.conf-sshd/crontab.old
|
||||
echo '$cron "/bin/bash ~/.conf-sshd/conf-sshd.sh -o" >> ~/.conf-sshd/run.log' >> ~/.conf-sshd/crontab.old
|
||||
crontab ~/.conf-sshd/crontab.old
|
||||
rm ~/.conf-sshd/crontab.old
|
||||
echo "Crontab has been configured.(Cron: '$cron')"
|
||||
|
Loading…
Reference in New Issue
Block a user