Compare commits

...

2 Commits

Author SHA1 Message Date
94e26a3072
Merge 019781f9ee into 483f7fd7f3 2024-04-01 14:16:41 +00:00
019781f9ee fix(install.sh): crontab fails on a new server 2024-04-01 22:16:34 +08:00

View File

@ -203,9 +203,10 @@ install_crontab()
if [[ -x $(command -v crontab) ]]; then
fmt_note "installing \"$CRON_JOB\" to crontab ..."
if ! crontab -l 1>/dev/null 2>&1; then
echo -n | crontab -
echo "$CRON_JOB" | crontab -
else
( crontab -l | grep -vxF "${CRON_JOB}" | grep -v "no crontab for"; echo "$CRON_JOB" ) | crontab -
fi
( crontab -l | grep -vxF "${CRON_JOB}" | grep -v "no crontab for"; echo "$CRON_JOB" ) | crontab -
else
fmt_warning "crontab does not exist. skipping ..."
fi