https://blue-build.org/ logo
Notify users of installed update?
# questions
t
When I installed Kinoite on a friends computer, they asked me how often they should restart it to install updates. I told them that about every week or so would do but I'm wondering if there's a way I could, in my own image, have a system that shows a single notification when a new update is installed and ready to reboot.
a
message has been deleted
g
You can create a systemd unit file that overrides the one in your image that's updating via
rpm-ostree
or
bootc
. You can use the command
notify-send
to create your own custom notification message
rpm-ostree
-
/usr/lib/systemd/system/rpm-ostreed-automatic.service
bootc
-
/usr/lib/systemd/system/bootc-fetch-apply-updates.service
You can copy the file into your repo's
files/
directory and then use the [
files
](https://blue-build.org/reference/modules/files/) module to copy it to the correct place. Afterwards, you can use the [
systemd
](https://blue-build.org/reference/modules/systemd/) module to enable it
t
so files/systemd/system/rpm-ostreed-automatic.service?
I'm assuming it would be proper to just add an
&&
to the end of the exec
g
I tend to put it in it's own directory in
files/
like
files/rpm-ostree-service/rpm-ostreed-automatic.service
and then have the
files
module do
Copy code
yaml
type: files
source: rpm-ostree-service
destination: /usr/lib/systemd/system/
You might want to throw everything in a bash call (i.e.
/bin/bash -c 'command in here'
)
Unless systemd does support that, but I'm not entirely sure
t
Is it better to do one over the other or is it personal preference?
g
Personal pref
Just keeps my tree clean
But since you brought up this question, I think I'm going to create this for my images lol
t
^_^
currently building... We'll see if it works
x
this could be a
bling
;)
2 Views