do-agent
do-agent copied to clipboard
Please provide a systemd timer as alternative to the crontab entry
On a Fedora installation, do-agent and droplet-agent are the only two things that pull in cronie and cronie-anacron. On systems where you're providing a systemd service anyway, it'd be nice to replace the crontab entry by a systemd timer and drop the dependency on cronie.
Something like this should work:
# do-agent-update.timer
[Unit]
Description=…
Wants=network-online.target
[Timer]
OnCalendar=*-*-* 01:00
RandomizedDelaySec=900
Persistent=true
[Install]
WantedBy=timers.target
# do-agent-update.service
[Unit]
Description=…
After=network-online.target
[Service]
Type=oneshot
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
ExecStart=/opt/digitalocean/do-agent/scripts/update.sh
See e.g. dnf-automatic.timer and dnf-automatic.service for an example of how to do this well.
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs.
still valid
still valid