diff options
author | mboelen <michael@cisofy.com> | 2014-10-02 17:15:19 +0400 |
---|---|---|
committer | mboelen <michael@cisofy.com> | 2014-10-02 17:15:19 +0400 |
commit | 231582ac534f4608fbf3cd5056adcd65be547bb9 (patch) | |
tree | a4f59a6d192e27f9504f7f416ae7e8b645412272 /extras/systemd | |
parent | 52fe3b68ba8ca369ac9fc121c5f8746fa3983304 (diff) |
Added systemd service script and timer (as replacement for cronjob)
Diffstat (limited to 'extras/systemd')
-rw-r--r-- | extras/systemd/lynis.service | 23 | ||||
-rw-r--r-- | extras/systemd/lynis.timer | 23 |
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 |