Updated systemd units

This commit is contained in:
Michael Boelen 2019-07-13 20:03:53 +02:00
parent 9f7e0775a5
commit 67eae302e1
No known key found for this signature in database
GPG Key ID: 26141F77A09D7F04
2 changed files with 20 additions and 8 deletions

View File

@ -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

View File

@ -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]