Sample Header Ad - 728x90

create a systemd startup script that delays 30 minutes

2 votes
2 answers
29018 views
I tried to create a systemd startup script that starts an rkhunter scan 30 minutes after system start of my laptop, like this:
[Unit]
Description=starts rkhunter and displays any findings with zenity

[Service]
ExecStartPre=/bin/sleep 1800
ExecStart=/usr/local/sbin/rkhunter-check

[Install]
WantedBy=default.target
But this fails with a timeout error Job for rkhunter.service failed because a timeout was exceeded. It seems like the ExecStartPre does not work like this. How do I solve this? A perfect solution would be: - first run 30 minutes after boot - repeat every 48 hours (in case you never shutdown your laptop)
Asked by rubo77 (30455 rep)
Jul 19, 2019, 09:44 PM
Last activity: Sep 16, 2021, 06:58 AM