Alexander Schäferdiek
15e4775679
All checks were successful
continuous-integration/drone/push Build is passing
85 lines
2.2 KiB
Groff
85 lines
2.2 KiB
Groff
.\" Automatically generated by Pandoc 3.0.1
|
||
.\"
|
||
.\" Define V font for inline verbatim, using C font in formats
|
||
.\" that render this, and otherwise B font.
|
||
.ie "\f[CB]x\f[]"x" \{\
|
||
. ftr V B
|
||
. ftr VI BI
|
||
. ftr VB B
|
||
. ftr VBI BI
|
||
.\}
|
||
.el \{\
|
||
. ftr V CR
|
||
. ftr VI CI
|
||
. ftr VB CB
|
||
. ftr VBI CBI
|
||
.\}
|
||
.TH "notifier" "1" "January 2023" "notifier" ""
|
||
.hy
|
||
.SH NAME
|
||
.PP
|
||
notifier - Notifies via mail or gotify.
|
||
Configuration is done in environment files.
|
||
.PD 0
|
||
.P
|
||
.PD
|
||
It\[cq]s part of \f[B]system-helpers\f[R].
|
||
.SH SYNOPSIS
|
||
.PP
|
||
\f[B]notifier\f[R] TITLE MESSAGE [MAIL_ADDRESS]
|
||
.SH DESCRIPTION
|
||
.PP
|
||
\f[B]notifier\f[R] executes \f[I]mailx\f[R] or \f[I]gotify\f[R] to send
|
||
out notifications.
|
||
It is used in other \f[B]system-helpers\f[R] by default.
|
||
.PP
|
||
By default, \f[B]notifier\f[R] tries to read from
|
||
\f[I]$HOME/.notifier.conf\f[R] and \f[I]/etc/notifier.conf\f[R] for
|
||
configuration.
|
||
It will exit with a non-zero exit code if it cannot find a proper
|
||
configuration file.
|
||
.PP
|
||
If all of the below variables are set and not empty as environment
|
||
variables, then \f[B]notifier\f[R] skips sourcing config files.
|
||
This allows a per-command configuration without relying on the global
|
||
configs.
|
||
.PP
|
||
The following configuration values can be set, defaults are shown as
|
||
well:
|
||
.PD 0
|
||
.P
|
||
.PD
|
||
.IP \[bu] 2
|
||
\f[B]NOTIFIER_MAIL_ENABLED=\[lq]true\[rq]\f[R] which enables or disables
|
||
notification via mail to \f[I]NOTIFIER_MAIL_ADDRESS\f[R].
|
||
.IP \[bu] 2
|
||
\f[B]NOTIFIER_MAIL_ADDRESS=\[lq]\[lq]\f[R] which requires
|
||
\f[I]mail.rc\f[R] to be configured and `\f[I]mailx\f[R]' command has be
|
||
available¸
|
||
.IP \[bu] 2
|
||
\f[B]NOTIFIER_GOTIFY_ENABLED=\[lq]false\[rq]\f[R] which `gotify' command
|
||
has be available and needs to be properly configured by having a
|
||
cli.json file
|
||
.PP
|
||
You can copy this script to \f[I]/usr/local/bin\f[R] and use create a
|
||
custom \f[B]CONFIG_FILE\f[R] as user.
|
||
.SH EXAMPLE
|
||
.PP
|
||
Create a \f[I]$HOME/.notifier.conf\f[R] and add
|
||
\f[I]NOTIFIER_MAIL_ADDRESS=\[lq]alias\[at]domain.tld\[rq]\f[R].
|
||
Notifications will be delivered to alias\[at]domain.tld or via gotify if
|
||
enabled.
|
||
Examples can be found in
|
||
\f[I]/usr/share/doc/system-helpers/notifier\f[R].
|
||
.SH EXIT VALUES
|
||
.TP
|
||
\f[B]0\f[R]
|
||
Success
|
||
.TP
|
||
\f[B]1\f[R]
|
||
Error
|
||
.SH SEE ALSO
|
||
.PP
|
||
\f[B]system-helpers\f[R]
|
||
.SH AUTHORS
|
||
Alexander Schäferdiek.
|