Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux:zfs [2025/02/05 12:46] – [ZFS - notification] admin | linux:zfs [2025/02/05 12:49] (current) – [ZFS - notification] admin | ||
---|---|---|---|
Line 66: | Line 66: | ||
===== ZFS - notification ===== | ===== ZFS - notification ===== | ||
- | ++++ notification zfs| | + | ++++ telegram |
<code BASH> | <code BASH> | ||
- | # https:// | + | # https:// |
+ | nano / | ||
+ | |||
+ | # | ||
+ | TELEGRAM_BOT_TOKEN=" | ||
+ | TELEGRAM_CHAT_ID=" | ||
+ | |||
+ | subject=" | ||
+ | details=" | ||
+ | |||
+ | MESSAGE=" | ||
+ | Event: $subject | ||
+ | Details: | ||
+ | $details" | ||
+ | |||
+ | curl -s -X POST " | ||
+ | -d " | ||
+ | -d " | ||
+ | |||
+ | chmod +x / | ||
+ | |||
+ | # zed-functions.sh Modified zed_notify function | ||
+ | zed_notify() | ||
+ | { | ||
+ | zed_notify_email " | ||
+ | [ " | ||
+ | [ " | ||
+ | |||
+ | # Execute external Telegram script if it exists | ||
+ | if [ -x "/ | ||
+ | / | ||
+ | [ " | ||
+ | [ " | ||
+ | fi | ||
+ | } | ||
</ | </ | ||
++++ | ++++ |