digitalocean / digitalocean/do-agent
Please provide a systemd timer as alternative to the crontab entry
- Dominant language
- Go
- Stars
- 617
- Forks
- 117
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 1
Description
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:
```ini
# 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.