mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #1324] How does ntfy/curl know if command ended successfully? #937
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#937
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lockheed on GitHub (Apr 28, 2025).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/1324
❓ Question
I am just getting into setting up ntfy using "&&" and "||" but it would help to know how does curl or ntfy know a particular command ended successfully or in error.
For example
ping google.com || curl -d "Pinging google failed!" ntfy.src.com/pingDoes it look for "error" in output, or is it something else?
@wunter8 commented on GitHub (Apr 28, 2025):
This depends on the specific shell language you're using. For example, that syntax could depend on how
bashinterprets whether a command succeeded or not (based on an exit code of the program).So in this case, if
pingexits successfully (with an exit code of0),curlwill not run. Ifpingfails (with a non-zero exit code),curlwill run