Difference between revisions of "Check nuki.sh"
Jump to navigation
Jump to search
Line 26: | Line 26: | ||
[[apt install swaks]] | [[apt install swaks]] | ||
+ | [[Send email]] | ||
Revision as of 13:39, 19 November 2024
#!/bin/bash OUTAGE=$(curl -m 10 https://status.nuki.io/en/ 2>&1 | grep -iwo outage | uniq); EMAIL="[email protected]" PASS="[[yourappgeneratedpassword]]" send_email () { swaks -4 --server smtp.gmail.com -tlsc --tls-protocol TLSv1_2 \ --from $EMAIL --to $EMAIL \ --auth LOGIN --auth-user $EMAIL --auth-password "$PASS" -apt \ --h-Subject '[KO] NUKI is currently experiencing an outage' --body 'Check NUKI' } if [[ $OUTAGE="Outage" ]]; then echo "Nuki is currently experiencing an outage"; send_email; else echo "Nuki is currently operating normally"; fi
apt install swaks Send email
Nuki, Smart Lock, Nuki Keypad 2, Nuki Web, Nuki Bridge, Nuki Opener, Matter, Akiles, check_nuki.sh
Advertising: