-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add signal API alerting #805
Changes from 19 commits
0d9a237
d8331c8
561b72e
03ebe68
1ad1679
958a446
47ad78c
fc5f2ba
b0d136e
00290ed
34760dd
13f5596
5176719
93a069b
8ccd04a
4a371c4
68bacb8
96bf454
2d05da4
e109427
05c5c94
59c88db
a405848
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,3 +58,8 @@ export RSYNC_PATH=/mnt/PIHDD/TeslaCam/ | |
Additional options for rsync over ssh can be configured using `~/.ssh/config` such as port number. To see all available options visit [the man page](https://linux.die.net/man/5/ssh_config). | ||
|
||
Stay in the `sudo -i` session return to the section "Set up the USB storage functionality" in the [main instructions](../README.md). | ||
|
||
# Step 3: Networking | ||
If you have a firewall between the server and teslausb you will need to allow ports 22 and ICMP. | ||
Port 22 is used for the rsync service | ||
ICMP is used to verify the archive is reachable from teslausb | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't appear to have anything to do with adding Signal notifications? |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,13 @@ title="$1" | |
message="$2" | ||
type="${3:-}" | ||
|
||
function send_signal () { | ||
log "Sending Signal message." | ||
|
||
curl -X POST -H "Content-Type: application/json" $SIGNAL_URL'/v2/send' \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
-d '{"message": "'"$message"'", "number": "'"$SIGNAL_FROM_NUM"'", "recipients": [ "'"$SIGNAL_TO_NUM"'" ]}' | ||
} | ||
|
||
function send_pushover () { | ||
log "Sending Pushover message." | ||
|
||
|
@@ -86,6 +93,7 @@ function send_shell () { | |
|
||
log "$message" | ||
|
||
[ "${SIGNAL_ENABLED:-false}" = "true" ] && send_signal | ||
[ "${PUSHOVER_ENABLED:-false}" = "true" ] && send_pushover | ||
[ "${GOTIFY_ENABLED:-false}" = "true" ] && send_gotify | ||
[ "${DISCORD_ENABLED:-false}" = "true" ] && send_discord | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're still adding a new empty line to this file.
This file shouldn't be part of the PR at all.