-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from cgwalters/add-systemd-auto
systemd: New bootc-fetch-apply-updates.{timer,service}
- Loading branch information
Showing
5 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# NAME | ||
|
||
bootc-fetch-apply-updates.service | ||
|
||
# DESCRIPTION | ||
|
||
This service causes `bootc` to perform the following steps: | ||
|
||
- Check the source registry for an updated container image | ||
- If one is found, download it | ||
- Reboot | ||
|
||
This service also comes with a companion `bootc-fetch-apply-updates.timer` | ||
systemd unit. The current default systemd timer shipped in the upstream | ||
project is enabled for daily updates. | ||
|
||
However, it is fully expected that different operating systems | ||
and distributions choose different defaults. | ||
|
||
## Customizing updates | ||
|
||
Note that all three of these steps can be decoupled; they | ||
are: | ||
|
||
- `bootc upgrade --check` | ||
- `bootc upgrade` | ||
- `bootc upgrade --apply` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 --apply --quiet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[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 | ||
|
||
[Install] | ||
WantedBy=timers.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters