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
diff options
context:
space:
mode:
Diffstat (limited to 'extras/systemd')
-rw-r--r--extras/systemd/lynis.service23
-rw-r--r--extras/systemd/lynis.timer23
2 files changed, 46 insertions, 0 deletions
diff --git a/extras/systemd/lynis.service b/extras/systemd/lynis.service
new file mode 100644
index 00000000..e7acdabc
--- /dev/null
+++ b/extras/systemd/lynis.service
@@ -0,0 +1,23 @@
+#################################################################################
+#
+# Lynis service file for systemd
+#
+#################################################################################
+#
+# - Adjust path to link to location where Lynis binary is installed
+# - Place this file together with the timer file in systemd directory
+# - Run: systemctl enable lynis.service
+#
+#################################################################################
+
+[Unit]
+Description=Lynis security audit and vulnerability scan
+
+[Service]
+Nice=19
+IOSchedulingClass=best-effort
+IOSchedulingPriority=7
+Type=simple
+ExecStart=/path/to/lynis -c --cronjob
+
+#EOF \ No newline at end of file
diff --git a/extras/systemd/lynis.timer b/extras/systemd/lynis.timer
new file mode 100644
index 00000000..e0490834
--- /dev/null
+++ b/extras/systemd/lynis.timer
@@ -0,0 +1,23 @@
+#################################################################################
+#
+# Lynis timer file for systemd
+#
+#################################################################################
+#
+# - Place this file together with the service file in systemd directory
+# - Run: systemctl enable lynis.timer
+# systemctl start lynis.service
+#
+#################################################################################
+
+[Unit]
+Description=Daily run for Lynis security audit and vulnerability scan
+
+[Timer]
+OnCalendar=daily
+Persistent=false
+
+[Install]
+WantedBy=timers.target
+
+#EOF \ No newline at end of file