From 67eae302e1a7b1bf665d46f0e15b612a10b40626 Mon Sep 17 00:00:00 2001 From: Michael Boelen Date: Sat, 13 Jul 2019 20:03:53 +0200 Subject: Updated systemd units --- extras/systemd/lynis.service | 14 ++++++++++---- extras/systemd/lynis.timer | 14 ++++++++++---- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'extras') diff --git a/extras/systemd/lynis.service b/extras/systemd/lynis.service index c49fdf12..21432c22 100644 --- a/extras/systemd/lynis.service +++ b/extras/systemd/lynis.service @@ -5,14 +5,17 @@ ################################################################################# # # - Adjust path to link to location where Lynis binary is installed -# - Place this file and the timer file together in the systemd directory -# (e.g. /etc/systemd/system/) -# - Run: systemctl enable lynis.service +# +# - Place this file together with the lynis.timer file in the related +# systemd directory (e.g. /etc/systemd/system/) +# +# - See details in lynis.timer file # ################################################################################# [Unit] -Description=Lynis security audit and vulnerability scan +Description=Security audit and vulnerability scanner +Documentation=https://cisofy.com/docs/ [Service] Nice=19 @@ -21,4 +24,7 @@ IOSchedulingPriority=7 Type=simple ExecStart=/path/to/lynis audit system --cronjob +[Install] +WantedBy=multi-user.target + #EOF diff --git a/extras/systemd/lynis.timer b/extras/systemd/lynis.timer index 169b3c17..83f5c144 100644 --- a/extras/systemd/lynis.timer +++ b/extras/systemd/lynis.timer @@ -4,17 +4,23 @@ # ################################################################################# # -# - Place this file together with the service file in systemd directory -# - Run: systemctl enable lynis.timer -# systemctl start lynis.service +# - Place this file together with the lynis.service file in the related +# systemd directory (e.g. /etc/systemd/system) +# +# - Tell systemd you made changes +# systemctl daemon-reload +# +# - Enable and start the timer (so no reboot is needed): +# systemctl enable --now lynis.timer # ################################################################################# [Unit] -Description=Daily run for Lynis security audit and vulnerability scan +Description=Daily timer for the Lynis security audit and vulnerability scanner [Timer] OnCalendar=daily +RandomizedDelaySec=1800 Persistent=false [Install] -- cgit v1.2.3