diff --git a/_man/src/systemd_failure_notify.1.md b/_man/src/systemd_failure_notify.1.md index c5dd7f2..6cc4776 100644 --- a/_man/src/systemd_failure_notify.1.md +++ b/_man/src/systemd_failure_notify.1.md @@ -21,7 +21,7 @@ The following are at least required for the script to work:\ By default, **SYSTEMD_FAILURE_NOTIFY_MAIL_ENABLED** is set to **true**. Set it to **false** to use *gotify* only.ΒΈ The following are optional and integrate gotify-cli to send notifications, it defaults to false: -- SYSTEMD_FAILURE_NOTIFY_GOTIFY_ENABLED="true" // 'gotify' command has be available and needs to be properly configured by having a cli.json file +- **SYSTEMD_FAILURE_NOTIFY_GOTIFY_ENABLED="true"** uses *gotify* command which has be available and needs to be properly configured by having a cli.json file. You can copy this script to */usr/local/bin* and use create a custom **CONFIG_FILE** as user. diff --git a/usr/local/bin/systemd_failure_notify b/usr/local/bin/systemd_failure_notify index 3a4ac38..5020c1d 100755 --- a/usr/local/bin/systemd_failure_notify +++ b/usr/local/bin/systemd_failure_notify @@ -13,8 +13,8 @@ EOF set -e; -SYSTEMD_FAILURE_NOTFY_SERVICE=$1 -if [ -z "$SYSTEMD_FAILURE_NOTFY_SERVICE" ]; then +SYSTEMD_FAILURE_NOTIFY_SERVICE=$1 +if [ -z "$SYSTEMD_FAILURE_NOTIFY_SERVICE" ]; then echo "No service given"; echo ""; usage; @@ -81,11 +81,11 @@ source_config() { source_config "$2" "$HOME/.systemd_failure_notify.conf" "/etc/systemd_failure_notify.conf" check_requirements "$SYSTEMD_FAILURE_NOTIFY_MAIL_ENABLED" "$SYSTEMD_FAILURE_NOTIFY_GOTIFY_ENABLED" -SYSTEMD_FAILURE_NOTFY_HOSTNAME=$(hostname) -SYSTEMD_FAILURE_NOTFY_USER=$(whoami) +SYSTEMD_FAILURE_NOTIFY_HOSTNAME=$(hostname) +SYSTEMD_FAILURE_NOTIFY_USER=$(whoami) -SUBJECT="[systemd $SYSTEMD_FAILURE_NOTFY_HOSTNAME for $SYSTEMD_FAILURE_NOTFY_USER] $SYSTEMD_FAILURE_NOTFY_SERVICE RUN FAILED" -MESSAGE="$SYSTEMD_FAILURE_NOTFY_SERVICE run failed" +SUBJECT="[systemd $SYSTEMD_FAILURE_NOTIFY_HOSTNAME for $SYSTEMD_FAILURE_NOTIFY_USER] $SYSTEMD_FAILURE_NOTIFY_USER RUN FAILED" +MESSAGE="$SYSTEMD_FAILURE_NOTIFY_SERVICE run failed" if [[ "${SYSTEMD_FAILURE_NOTIFY_MAIL_ENABLED}" == "true" ]]; then echo "$MESSAGE"|mailx -Ssendwait -s "$SUBJECT" "$SYSTEMD_FAILURE_NOTIFY_MAIL_ADDRESS"; diff --git a/usr/share/man/man1/system-helpers.1 b/usr/share/man/man1/system-helpers.1 index 2c1fb85..b7fa3f7 100644 --- a/usr/share/man/man1/system-helpers.1 +++ b/usr/share/man/man1/system-helpers.1 @@ -20,8 +20,6 @@ .PP system-helpers - Collection of helper systemd services, systemd timers and shell scripts for common configuration. -Designed for use with ArchLinux, although most scripts should work on -any distribution. .SH DESCRIPTION .PP \f[B]system-helpers\f[R] collection provides the following helpers diff --git a/usr/share/man/man1/systemd_failure_notify.1 b/usr/share/man/man1/systemd_failure_notify.1 index 9605d62..f491d57 100644 --- a/usr/share/man/man1/systemd_failure_notify.1 +++ b/usr/share/man/man1/systemd_failure_notify.1 @@ -58,9 +58,9 @@ Set it to \f[B]false\f[R] to use \f[I]gotify\f[R] only.\[ac] .PP The following are optional and integrate gotify-cli to send notifications, it defaults to false: - -SYSTEMD_FAILURE_NOTIFY_GOTIFY_ENABLED=\[lq]true\[rq] // `gotify' command -has be available and needs to be properly configured by having a -cli.json file +\f[B]SYSTEMD_FAILURE_NOTIFY_GOTIFY_ENABLED=\[lq]true\[rq]\f[R] uses +\f[I]gotify\f[R] command which 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.