mirror of
https://github.com/hassio-addons/addon-wireguard.git
synced 2025-05-04 10:51:23 +00:00
Make API service honor port setting
This commit is contained in:
parent
c68cd28954
commit
5b98ad95fb
1 changed files with 4 additions and 1 deletions
|
@ -15,6 +15,9 @@ declare public_key
|
|||
declare transfer_rx
|
||||
declare transfer_tx
|
||||
|
||||
PORT=$(bashio::addon.port "80/tcp")
|
||||
if [[ $PORT -eq 0 ]]; then exit; fi
|
||||
|
||||
while true; do
|
||||
# Get information from wg
|
||||
peers=()
|
||||
|
@ -48,5 +51,5 @@ while true; do
|
|||
fi
|
||||
|
||||
echo -e "HTTP/1.1 200 OK\r\nContent-type: application/json\r\n\r\n${json}" \
|
||||
| nc -l -p 80 > /dev/null
|
||||
| nc -l -p $PORT > /dev/null
|
||||
done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue