diff --git a/Containerfile b/Containerfile index 541f3ca..ef301eb 100644 --- a/Containerfile +++ b/Containerfile @@ -6,6 +6,6 @@ COPY etc etc RUN dnf install vim ncdu -y && \ dnf remove firefox firefox-langpacks -y && \ - systemctl enable bootc-fetch-apply-updates.timer && \ + systemctl enable bootc-auto-update.timer && \ ostree container commit && \ bootc container lint diff --git a/etc/systemd/system/bootc-auto-update.service b/etc/systemd/system/bootc-auto-update.service new file mode 100644 index 0000000..4918ca0 --- /dev/null +++ b/etc/systemd/system/bootc-auto-update.service @@ -0,0 +1,8 @@ +[Unit] +Description=Apply bootc updates +Documentation=man:bootc(8) +ConditionPathExists=/run/ostree-booted + +[Service] +Type=oneshot +ExecStart=/usr/bin/bootc update --quiet diff --git a/etc/systemd/system/bootc-auto-update.timer b/etc/systemd/system/bootc-auto-update.timer new file mode 100644 index 0000000..4ebb663 --- /dev/null +++ b/etc/systemd/system/bootc-auto-update.timer @@ -0,0 +1,14 @@ +[Unit] +Description=Apply bootc updates +Documentation=man:bootc(8) +ConditionPathExists=/run/ostree-booted + +[Timer] +OnBootSec=1h +# This time is relatively arbitrary and obviously expected to be overridden/changed +OnUnitInactiveSec=8h +# When deploying a large number of systems, it may be beneficial to increase this value to help with load on the registry. +RandomizedDelaySec=2h + +[Install] +WantedBy=timers.target diff --git a/etc/systemd/system/bootc-fetch-apply-updates.service.d/override.conf b/etc/systemd/system/bootc-fetch-apply-updates.service.d/override.conf deleted file mode 100644 index 5d9603b..0000000 --- a/etc/systemd/system/bootc-fetch-apply-updates.service.d/override.conf +++ /dev/null @@ -1,2 +0,0 @@ -[Service] -ExecStart=/usr/bin/bootc update --quiet