Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lynis
diff options
context:
space:
mode:
authormboelen <michael@cisofy.com>2016-04-15 15:38:05 +0300
committermboelen <michael@cisofy.com>2016-04-15 15:38:05 +0300
commitcbfa62a90404d3b240e0ba19ae9b0fcbd725161a (patch)
tree1e11b4110c784233444d68b0872028b3a12a2d18 /lynis
parente86c68e3c54ae92329046745ce41aa2a74788f64 (diff)
lynis
Diffstat (limited to 'lynis')
-rwxr-xr-xlynis5
1 files changed, 5 insertions, 0 deletions
diff --git a/lynis b/lynis
index a996e755..5a02569b 100755
--- a/lynis
+++ b/lynis
@@ -320,6 +320,11 @@ ${YELLOW}Note: ${WHITE}Cancelling the program can leave temporary files behind${
"
wait_for_keypress
+ 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
+ fi
+
# Deleting any stale PID files that might exist. Note: Display function does not work yet at this point
if [ -f "${MYHOMEDIR}/lynis.pid" ]; then rm -f "${MYHOMEDIR}/lynis.pid"; fi
if [ -f "./lynis.pid" ]; then rm -f "./lynis.pid"; fi