diff options
-rw-r--r-- | mirror.service | 1 | ||||
-rw-r--r-- | mirror.service.8 | 24 | ||||
-rw-r--r-- | mirror.timer | 4 |
3 files changed, 23 insertions, 6 deletions
diff --git a/mirror.service b/mirror.service index 6556312..320d631 100644 --- a/mirror.service +++ b/mirror.service @@ -1,6 +1,7 @@ [Unit] Description=Git Repositories Mirror Documentation=man:mirror.service(8) +Documentation=man:mirror(1) [Service] Type=oneshot diff --git a/mirror.service.8 b/mirror.service.8 index 9204b99..2e70c1b 100644 --- a/mirror.service.8 +++ b/mirror.service.8 @@ -1,17 +1,31 @@ -.TH mirror.service 8 "2024-01-05" +.TH mirror.service 8 "2024-01-19" .SH NAME -mirror.service, mirror.timer - systemd unit files for automated git mirroring +mirror.service, mirror.timer - systemd units for automated git mirroring .SH SYNOPSIS -.B /usr/lib/systemd/system/mirror.service +.B mirror.service .br -.B /usr/lib/systemd/system/mirror.timer +.B mirror.timer .SH DESCRIPTION -Periodically run +Periodically runs .BR mirror (1) by default in .I /srv/mirror with repositories list sourced from .IR /srv/mirror/repositories.mirror . +Writing down list of sources in this file and then enabling +.B mirror.timer +is enough for a simple setup. +.P +By default timer is configured to use +.B Persistent=true +setting which may cause races with DNS resolvers like +.BR systemd-resolved.service . +Currently, it does not seem like there is a good built-in solution to handle it. You may choose to write and depend on a +target that marks the moment after which network DNS resolution is ready. +.SH FILES +.I /usr/lib/systemd/system/mirror.service +.br +.I /usr/lib/systemd/system/mirror.timer .SH SEE ALSO .BR mirror (1), .BR mirror (5) diff --git a/mirror.timer b/mirror.timer index d021fa6..6975c53 100644 --- a/mirror.timer +++ b/mirror.timer @@ -1,7 +1,9 @@ [Unit] Description=Git Repositories Mirror Documentation=man:mirror.timer(8) -After=network-online.target +Documentation=man:mirror(1) +Wants=network-online.target nss-lookup.target +After=network-online.target nss-lookup.target [Timer] OnCalendar=daily |