Fix check_updates and update man reference to point to correct examples
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Alexander Schäferdiek 2023-01-27 00:53:23 +01:00
parent 53f0b85572
commit 13c7335ee3
24 changed files with 35 additions and 28 deletions

View file

@ -23,7 +23,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.check_updates.conf* and add *CHECK_UPDATES_UPDATES_CMD="..."*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/check_updates*. Create a *$HOME/.check_updates.conf* and add *CHECK_UPDATES_UPDATES_CMD="..."*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/system-helpers/check_updates*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -23,7 +23,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.disk_space_alert.conf* and add *DISK_SPACE_ALERT_THRESHOLD="95"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/disk_space_alert*. Create a *$HOME/.disk_space_alert.conf* and add *DISK_SPACE_ALERT_THRESHOLD="95"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/system-helpers/disk_space_alert*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -23,7 +23,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.docker_check.conf* and add *DOCKER_CHECK_NOTIFY_LEVELS="(WARNING)"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/docker_check*. Create a *$HOME/.docker_check.conf* and add *DOCKER_CHECK_NOTIFY_LEVELS="(WARNING)"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/system-helpers/docker_check*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -26,7 +26,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.docker_compose_update.conf* and necessary configuration. Examples can be found in */usr/share/doc/docker_compose_update*. Create a *$HOME/.docker_compose_update.conf* and necessary configuration. Examples can be found in */usr/share/doc/system-helpers/docker_compose_update*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -26,7 +26,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.dynv6.conf* and add *DYNV6_TOKEN="mySecretToken"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/dynv6*. Create a *$HOME/.dynv6.conf* and add *DYNV6_TOKEN="mySecretToken"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/system-helpers/dynv6*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -22,7 +22,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.memory_usage_alert.conf* and add *MEMORY_USAGE_ALERT_THRESHOLD="1024"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/memory_usage_alert*. Create a *$HOME/.memory_usage_alert.conf* and add *MEMORY_USAGE_ALERT_THRESHOLD="1024"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/system-helpers/memory_usage_alert*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -25,7 +25,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.notifier.conf* and add *NOTIFIER_MAIL_ADDRESS="alias@domain.tld"*. Notifications will be delivered to alias@domain.tld or via gotify if enabled. Examples can be found in */usr/share/doc/notifier*. Create a *$HOME/.notifier.conf* and add *NOTIFIER_MAIL_ADDRESS="alias@domain.tld"*. Notifications will be delivered to alias@domain.tld or via gotify if enabled. Examples can be found in */usr/share/doc/system-helpers/notifier*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -22,7 +22,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.smartctl_tests_long.conf* and add *SMARTCTL_TESTS_LONG_DEVICES="(nvme1 sdc sdf)"*. Notifications will be delivered via **notifier** for default block device **sda**. Examples can be found in */usr/share/doc/smart_tests_long*. Create a *$HOME/.smartctl_tests_long.conf* and add *SMARTCTL_TESTS_LONG_DEVICES="(nvme1 sdc sdf)"*. Notifications will be delivered via **notifier** for default block device **sda**. Examples can be found in */usr/share/doc/system-helpers/smart_tests_long*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -22,5 +22,5 @@ shell scripts for common tasks.
Provided systemd services mostly support notifications if they have failed Provided systemd services mostly support notifications if they have failed
via **systemd_failure_notify** which uses **notifier** (see **man notifier**). via **systemd_failure_notify** which uses **notifier** (see **man notifier**).
See */usr/share/doc/system-helpers* for example configurations which should See */usr/share/doc/system-helpers/system-helpers* for example configurations which should
be copied inside **$HOME** or **/etc** depending on the helper script. be copied inside **$HOME** or **/etc** depending on the helper script.

View file

@ -22,7 +22,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.systemd_check.conf* and add *SYSTEMD_CHECK_LIST_FILE="/other/path/to/list"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/systemd_check*. Create a *$HOME/.systemd_check.conf* and add *SYSTEMD_CHECK_LIST_FILE="/other/path/to/list"*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/system-helpers/systemd_check*.
# EXIT VALUES # EXIT VALUES
**0** **0**

View file

@ -19,7 +19,7 @@ You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FI
# EXAMPLE # EXAMPLE
Create a *$HOME/.systemd_failure_notify.conf*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/systemd_failure_notify*. Create a *$HOME/.systemd_failure_notify.conf*. Notifications will be delivered via **notifier**. Examples can be found in */usr/share/doc/system-helpers/systemd_failure_notify*.
Then, add **systemd_failure_notify@serviceName** in a systemd unit file in the **OnFailure** directive: Then, add **systemd_failure_notify@serviceName** in a systemd unit file in the **OnFailure** directive:

View file

@ -64,13 +64,12 @@ check_required() {
type hostname &> /dev/null || { echo "Requiring 'hostname' but it's not installed"; exit 1; } type hostname &> /dev/null || { echo "Requiring 'hostname' but it's not installed"; exit 1; }
} }
CHECK_UPDATES_UPDATES=$(eval "${CHECK_UPDATES_UPDATES_CMD}")
CHECK_UPDATES_UPDATES_AMOUNT=$(eval "${CHECK_UPDATES_UPDATES_AMOUNT_CMD}")
source_config "$HOME/.check_updates.conf" "/etc/check_updates.conf" source_config "$HOME/.check_updates.conf" "/etc/check_updates.conf"
apply_defaults apply_defaults
check_required check_required
CHECK_UPDATES_UPDATES=$(eval "${CHECK_UPDATES_UPDATES_CMD}")
CHECK_UPDATES_UPDATES_AMOUNT=$(eval "${CHECK_UPDATES_UPDATES_AMOUNT_CMD}")
HOSTNAME=$(hostname) HOSTNAME=$(hostname)
if [[ "$CHECK_UPDATES_UPDATES_AMOUNT" -gt "0" ]]; then if [[ "$CHECK_UPDATES_UPDATES_AMOUNT" -gt "0" ]]; then

View file

@ -68,7 +68,7 @@ else
fi fi
if [[ ! -f $listFileToUse ]]; then if [[ ! -f $listFileToUse ]]; then
echo "$listFileToUse doesn't exist. Add a file which holds one systemd service or timer per line."; echo "$listFileToUse doesn't exist. Add a file which holds one docker container or timer per line.";
echo ""; echo "";
usage; usage;
exit 1; exit 1;

View file

@ -63,7 +63,8 @@ custom \f[B]CONFIG_FILE\f[R] as user.
Create a \f[I]$HOME/.check_updates.conf\f[R] and add Create a \f[I]$HOME/.check_updates.conf\f[R] and add
\f[I]CHECK_UPDATES_UPDATES_CMD=\[lq]\&...\[rq]\f[R]. \f[I]CHECK_UPDATES_UPDATES_CMD=\[lq]\&...\[rq]\f[R].
Notifications will be delivered via \f[B]notifier\f[R]. Notifications will be delivered via \f[B]notifier\f[R].
Examples can be found in \f[I]/usr/share/doc/check_updates\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/check_updates\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -60,7 +60,8 @@ custom \f[B]CONFIG_FILE\f[R] as user.
Create a \f[I]$HOME/.disk_space_alert.conf\f[R] and add Create a \f[I]$HOME/.disk_space_alert.conf\f[R] and add
\f[I]DISK_SPACE_ALERT_THRESHOLD=\[lq]95\[rq]\f[R]. \f[I]DISK_SPACE_ALERT_THRESHOLD=\[lq]95\[rq]\f[R].
Notifications will be delivered via \f[B]notifier\f[R]. Notifications will be delivered via \f[B]notifier\f[R].
Examples can be found in \f[I]/usr/share/doc/disk_space_alert\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/disk_space_alert\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -67,7 +67,8 @@ custom \f[B]CONFIG_FILE\f[R] as user.
Create a \f[I]$HOME/.docker_check.conf\f[R] and add Create a \f[I]$HOME/.docker_check.conf\f[R] and add
\f[I]DOCKER_CHECK_NOTIFY_LEVELS=\[lq](WARNING)\[rq]\f[R]. \f[I]DOCKER_CHECK_NOTIFY_LEVELS=\[lq](WARNING)\[rq]\f[R].
Notifications will be delivered via \f[B]notifier\f[R]. Notifications will be delivered via \f[B]notifier\f[R].
Examples can be found in \f[I]/usr/share/doc/docker_check\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/docker_check\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -88,7 +88,8 @@ custom \f[B]CONFIG_FILE\f[R] as user.
.PP .PP
Create a \f[I]$HOME/.docker_compose_update.conf\f[R] and necessary Create a \f[I]$HOME/.docker_compose_update.conf\f[R] and necessary
configuration. configuration.
Examples can be found in \f[I]/usr/share/doc/docker_compose_update\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/docker_compose_update\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -73,7 +73,7 @@ custom \f[B]CONFIG_FILE\f[R] as user.
Create a \f[I]$HOME/.dynv6.conf\f[R] and add Create a \f[I]$HOME/.dynv6.conf\f[R] and add
\f[I]DYNV6_TOKEN=\[lq]mySecretToken\[rq]\f[R]. \f[I]DYNV6_TOKEN=\[lq]mySecretToken\[rq]\f[R].
Notifications will be delivered via \f[B]notifier\f[R]. Notifications will be delivered via \f[B]notifier\f[R].
Examples can be found in \f[I]/usr/share/doc/dynv6\f[R]. Examples can be found in \f[I]/usr/share/doc/system-helpers/dynv6\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -51,7 +51,8 @@ custom \f[B]CONFIG_FILE\f[R] as user.
Create a \f[I]$HOME/.memory_usage_alert.conf\f[R] and add Create a \f[I]$HOME/.memory_usage_alert.conf\f[R] and add
\f[I]MEMORY_USAGE_ALERT_THRESHOLD=\[lq]1024\[rq]\f[R]. \f[I]MEMORY_USAGE_ALERT_THRESHOLD=\[lq]1024\[rq]\f[R].
Notifications will be delivered via \f[B]notifier\f[R]. Notifications will be delivered via \f[B]notifier\f[R].
Examples can be found in \f[I]/usr/share/doc/memory_usage_alert\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/memory_usage_alert\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -64,7 +64,8 @@ Create a \f[I]$HOME/.notifier.conf\f[R] and add
\f[I]NOTIFIER_MAIL_ADDRESS=\[lq]alias\[at]domain.tld\[rq]\f[R]. \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 Notifications will be delivered to alias\[at]domain.tld or via gotify if
enabled. enabled.
Examples can be found in \f[I]/usr/share/doc/notifier\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/notifier\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -55,7 +55,8 @@ Create a \f[I]$HOME/.smartctl_tests_long.conf\f[R] and add
\f[I]SMARTCTL_TESTS_LONG_DEVICES=\[lq](nvme1 sdc sdf)\[rq]\f[R]. \f[I]SMARTCTL_TESTS_LONG_DEVICES=\[lq](nvme1 sdc sdf)\[rq]\f[R].
Notifications will be delivered via \f[B]notifier\f[R] for default block Notifications will be delivered via \f[B]notifier\f[R] for default block
device \f[B]sda\f[R]. device \f[B]sda\f[R].
Examples can be found in \f[I]/usr/share/doc/smart_tests_long\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/smart_tests_long\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -54,8 +54,8 @@ Provided systemd services mostly support notifications if they have
failed via \f[B]systemd_failure_notify\f[R] which uses failed via \f[B]systemd_failure_notify\f[R] which uses
\f[B]notifier\f[R] (see \f[B]man notifier\f[R]). \f[B]notifier\f[R] (see \f[B]man notifier\f[R]).
.PP .PP
See \f[I]/usr/share/doc/system-helpers\f[R] for example configurations See \f[I]/usr/share/doc/system-helpers/system-helpers\f[R] for example
which should be copied inside \f[B]$HOME\f[R] or \f[B]/etc\f[R] configurations which should be copied inside \f[B]$HOME\f[R] or
depending on the helper script. \f[B]/etc\f[R] depending on the helper script.
.SH AUTHORS .SH AUTHORS
Alexander Sch\[:a]ferdiek. Alexander Sch\[:a]ferdiek.

View file

@ -58,7 +58,8 @@ custom \f[B]CONFIG_FILE\f[R] as user.
Create a \f[I]$HOME/.systemd_check.conf\f[R] and add Create a \f[I]$HOME/.systemd_check.conf\f[R] and add
\f[I]SYSTEMD_CHECK_LIST_FILE=\[lq]/other/path/to/list\[rq]\f[R]. \f[I]SYSTEMD_CHECK_LIST_FILE=\[lq]/other/path/to/list\[rq]\f[R].
Notifications will be delivered via \f[B]notifier\f[R]. Notifications will be delivered via \f[B]notifier\f[R].
Examples can be found in \f[I]/usr/share/doc/systemd_check\f[R]. Examples can be found in
\f[I]/usr/share/doc/system-helpers/systemd_check\f[R].
.SH EXIT VALUES .SH EXIT VALUES
.TP .TP
\f[B]0\f[R] \f[B]0\f[R]

View file

@ -47,7 +47,7 @@ custom \f[B]CONFIG_FILE\f[R] as user.
Create a \f[I]$HOME/.systemd_failure_notify.conf\f[R]. Create a \f[I]$HOME/.systemd_failure_notify.conf\f[R].
Notifications will be delivered via \f[B]notifier\f[R]. Notifications will be delivered via \f[B]notifier\f[R].
Examples can be found in Examples can be found in
\f[I]/usr/share/doc/systemd_failure_notify\f[R]. \f[I]/usr/share/doc/system-helpers/systemd_failure_notify\f[R].
.PP .PP
Then, add \f[B]systemd_failure_notify\[at]serviceName\f[R] in a systemd Then, add \f[B]systemd_failure_notify\[at]serviceName\f[R] in a systemd
unit file in the \f[B]OnFailure\f[R] directive: unit file in the \f[B]OnFailure\f[R] directive: