forked from cimryan/teslausb
-
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
Closed
Closed
Changes from 21 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
0d9a237
Update send-push-message
cooperose d8331c8
Update send-push-message
cooperose 561b72e
Update send-push-message
cooperose 03ebe68
Update teslausb_setup_variables.conf.sample
cooperose 1ad1679
Update send-push-message
cooperose 958a446
Update send-push-message
cooperose 47ad78c
Update teslausb_setup_variables.conf.sample
cooperose fc5f2ba
fix typo in URL
cooperose b0d136e
remove unnecessary quotes
cooperose 00290ed
add notification check and Networking docuementation
34760dd
Update send-push-message
cooperose 13f5596
Fix quoting
cooperose 5176719
Make variables specific to signal
cooperose 93a069b
Update variables to match
cooperose 8ccd04a
Update Variables
cooperose 4a371c4
Update configure.sh
cooperose 68bacb8
fixed variables on log_process
cooperose 96bf454
Merge branch 'marcone:main-dev' into main-dev
cooperose 2d05da4
Add quotes to address shellshock vuln
cooperose e109427
remove dated documentation entry.
cooperose 05c5c94
Merge branch 'marcone:main-dev' into main-dev
cooperose 59c88db
Add quotes to send-push-message signal url line.
cooperose a405848
remove blank space from rysnc docs.
cooperose File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.