mirror of https://github.com/CISOfy/lynis.git
Quit when cronjob is used and PID file exists
This commit is contained in:
parent
cbfa62a904
commit
495b49e7a8
4
lynis
4
lynis
|
@ -318,11 +318,13 @@ You are advised to check for temporary files after program completion.
|
|||
|
||||
${YELLOW}Note: ${WHITE}Cancelling the program can leave temporary files behind${NORMAL}
|
||||
"
|
||||
wait_for_keypress
|
||||
|
||||
# Quit directly for cron jobs.
|
||||
if [ ${CRONJOB} -eq 1 ]; then
|
||||
echo "Quitting, to prevent multiple cron jobs running at the same time"
|
||||
exit 1 # Manually exit, no cleanups to prevent deleting an active PID file
|
||||
else
|
||||
wait_for_keypress
|
||||
fi
|
||||
|
||||
# Deleting any stale PID files that might exist. Note: Display function does not work yet at this point
|
||||
|
|
Loading…
Reference in New Issue