mirror of
https://github.com/mag37/dockcheck.git
synced 2026-02-14 15:28:22 +01:00
[Issue 255] Fix Notifiy also checking for /etc/HOSTNAME (#256)
* - Adjusted **FromHost** variable to have fallback options when `cat /etc/hostname` or `hostname` command fails. * - Bumped Version to 0.7
This commit is contained in:
parent
4e0b705b8b
commit
fc5c5db72b
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
NOTIFY_V2_VERSION="v0.6"
|
||||
NOTIFY_V2_VERSION="v0.7"
|
||||
#
|
||||
# If migrating from an older notify template, remove your existing notify.sh file.
|
||||
# Leave (or place) this file in the "notify_templates" subdirectory within the same directory as the main dockcheck.sh script.
|
||||
|
|
@ -40,7 +40,7 @@ done
|
|||
|
||||
enabled_notify_templates=( "${!unique_templates[@]}" )
|
||||
|
||||
FromHost=$(cat /etc/hostname)
|
||||
FromHost="$(cat /etc/hostname 2>/dev/null)" || FromHost="$(hostname 2>/dev/null)" || FromHost="UNKNOWN"
|
||||
|
||||
CurrentEpochTime=$(date +"%Y-%m-%dT%H:%M:%S")
|
||||
CurrentEpochSeconds=$(date +%s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue