1

My machine is running Rockylinux 8. I would like to receive the notifications by email, but I believe that I have to self-host a SMTP server if that's correct.

So I find out Gotify as a notification tool for my phone. I want dnf-automatic to execute a gotify-cli command, which kind of looks like this, as "body" is the body of the message:

gotify push "body"

Here's part of the config file for dnf-automatic:

[emitters]
emit_via = command

[command]
# The shell command to execute. This is a Python format string, as used in
# str.format(). The format function will pass a shell-quoted argument called
# `body`.
command_format = "gotify push"

# The contents of stdin to pass to the command. It is a format string with the
# same arguments as `command_format`.
stdin_format = "{body}"

Am I setting this up correctly? I have no experience in Python. And does anyone knows how to change how often the machine runs dnf-automatic.timer, so I can troubleshoot.

1 Answers1

0

You probably want

[emitters]
emit_via = command

[command]
command_format = gotify push "{body}"

For reference, this is the code that interpolates the body variable into your command.

Unless your command reads the standard input you can ignore the stdin_format, which gets defaulted to {body} anyway (source).