Skip to content

Commit

Permalink
fix: broken connection-event curl request
Browse files Browse the repository at this point in the history
the script was creating {"status":"connected"} instead of '{"status":"connected"}'
  • Loading branch information
LoV432 committed Nov 22, 2023
1 parent 9c5210f commit d3d412e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions router_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,10 @@ echo "Script created /etc/hotplug.d/dhcp/99-dhcp-trigger"
content='#!/bin/ash
if [[ "$INTERFACE" == "INTERFACE_HERE" && "$ACTION" == "ifup" ]]; then
curl -d '{"status":"connected"}' -X POST URL_HERE/api/connection-event
curl -d '"'"'{"status":"connected"}'"'"' -X POST URL_HERE/api/connection-event
elif [[ "$INTERFACE" == "INTERFACE_HERE" && "$ACTION" == "ifdown" ]]; then
curl -d '{"status":"disconnected"}' -X POST URL_HERE/api/connection-event
curl -d '"'"'{"status":"disconnected"}'"'"' -X POST URL_HERE/api/connection-event
fi
'
content="${content//URL_HERE/$1}"
Expand Down

0 comments on commit d3d412e

Please sign in to comment.