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/extras
diff options
context:
space:
mode:
authorMichael Boelen <michael.boelen@cisofy.com>2019-07-13 21:03:53 +0300
committerMichael Boelen <michael.boelen@cisofy.com>2019-07-13 21:03:53 +0300
commit67eae302e1a7b1bf665d46f0e15b612a10b40626 (patch)
tree992b0fccac29389ce7f8bf9ec1fba7120d473b52 /extras
parent9f7e0775a57781ae6e7a247e71a149f25ef7a02d (diff)
Updated systemd units
Diffstat (limited to 'extras')
-rw-r--r--extras/systemd/lynis.service14
-rw-r--r--extras/systemd/lynis.timer14
2 files changed, 20 insertions, 8 deletions
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]