Commit 83aca10e authored by nono's avatar nono 💻
Browse files

Ajout des fichiers systemd pour Rkhunter et activation de sa configuration

parent 2775c020
# RKhunter
- name: Installation de rkhunter
package:
name: rkhunter
state: present
- name: Installation du service rkhunter
template:
src: rkhunter/rkhunter.service
dest: /etc/systemd/system/rkhunter.service
owner: root
group: root
mode: 0644
- name: Activation du service Rkhunter
systemd:
name: rkhunter
enabled: yes
- name: Configuration de rkhunter
template:
src: rkhunter/rkhunter.conf.j2
......@@ -9,3 +27,15 @@
mode: 0644
notify:
- Relance de rkhunter
- name: Vérification de l'état de Rkhunter
systemd:
state: started
name: rkhunter
- name: Installation du timer rkhunter
systemd:
name: rkhunter.timer
state: started
enabled: yes
[Unit]
Description=Rootkit Hunter
Documentation=man:rkhunter man:systemd.service
[Service]
Type=oneshot
ExecStartPre=-/usr/bin/rkhunter --update
ExecStartPre=-/usr/bin/rkhunter --propupd
ExecStart=/usr/bin/rkhunter --check --sk --cronjob --propupd --report-warnings-only
SuccessExitStatus=1 2 8 SIGKILL TERM
[Install]
WantedBy=multi-user.target
Unit]
Description=Daily Rootkit Scan
[Timer]
OnCalendar=05:00:00
Persistent=true
[Install]
WantedBy=timers.target
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment