jumpserver use /etc/crontabs/root instead of /etc/crontab

This commit is contained in:
Dict Xiong 2023-04-21 17:56:16 +08:00
parent 179eac4dc6
commit a11b2b60c7

View File

@ -18,6 +18,6 @@ insert_if_not_exist()
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
}
insert_if_not_exist "/etc/crontab" "*/5 * * * * root cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/jumpserver_cron.sh"
insert_if_not_exist "/etc/crontabs/root" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/jumpserver_cron.sh"
"$THIS_DIR"/jumpserver_cron.sh