commit 340b87362d7a5b89cea51ac858d3c902b4fd9caa Author: Robinson Bomze Date: Sun Sep 15 20:09:35 2024 +0200 initial commit diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..9f2cd99 --- /dev/null +++ b/Readme.md @@ -0,0 +1,8 @@ +## setup ntfy + +### mdadm +- add line with 'PROGRAM' to your existing mdadm config, usually in /etc/mdadm/mdadm.cfg +- place ''mdadm-notify.sh'' in a folder specified in the config, eg. /usr/local/bin +- make the script executable, with eg. ''chmod +x /usr/local/bin/mdadm-notiy.sh'' + + diff --git a/mdadm-notify.sh b/mdadm-notify.sh new file mode 100755 index 0000000..08dd10f --- /dev/null +++ b/mdadm-notify.sh @@ -0,0 +1,5 @@ +#!/bin/sh +curl -H "t: mdadm odroidh2" -d "$1 \ +$2 \ +$3" \ +ntfy.sh/my_secret_channel_name > /dev/null 2>&1 diff --git a/mdadm.conf b/mdadm.conf new file mode 100644 index 0000000..ff07197 --- /dev/null +++ b/mdadm.conf @@ -0,0 +1,26 @@ +# mdadm.conf +# +# !NB! Run update-initramfs -u after updating this file. +# !NB! This will ensure that initramfs has an uptodate copy. +# +# Please refer to mdadm.conf(5) for information about this file. +# + +# by default (built-in), scan all partitions (/proc/partitions) and all +# containers for MD superblocks. alternatively, specify devices to scan, using +# wildcards if desired. +#DEVICE partitions containers + +# automatically tag new arrays as belonging to the local system +HOMEHOST + +# instruct the monitoring daemon where to send mail alerts +#MAILADDR root + +PROGRAM /usr/local/bin/mdadm-notify.sh + +# definitions of existing MD arrays +ARRAY /dev/md/0 metadata=1.2 UUID=7033fc0b:aba014cc:80714c0a:d227f7ea name=odroidh2:0 +ARRAY /dev/md/odroidh2:1 metadata=1.2 UUID=d0664ebc:fd881bf6:35ffbd86:895c292d name=odroidh2:1 + +# This configuration was auto-generated on Tue, 06 Feb 2024 19:42:05 +0100 by mkconf