Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
syncthing/run: Set gui-address to first IP in container
Browse files Browse the repository at this point in the history
  • Loading branch information
reedy authored and Poeschl committed Oct 13, 2023
1 parent 9f94cbe commit ee78d21
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions syncthing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 1.16.4 - 2023-10-??

* 🔨 Set gui-address to first IP in container (thanks @reedy | #426)
* 🔨 DOCS.md: Add information about HA Syncthing Integration (thanks @reedy & @salim-b | #420)
* 🔨 DOCS.md: Improve Configuration section (thanks @reedy | #419)
* 🔼 Updated syncthing to `1.25.0-r0` (thanks @salim-b | #412)
Expand Down
11 changes: 10 additions & 1 deletion syncthing/root/etc/s6-overlay/s6-rc.d/syncthing/run
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,14 @@ export STNOUPGRADE=1
bashio::log.info 'Setup config'
mkdir -p /data/config

ip=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}' | head -n 1)

if [ -z "$ip" ]
then
ip=0.0.0.0
fi

bashio::log.info "Detected IP Address: $ip"

bashio::log.info 'Start syncthing'
syncthing --no-browser --no-restart --home=/data/config --gui-address=0.0.0.0:8384
syncthing --no-browser --no-restart --home=/data/config --gui-address="$ip:8384"

0 comments on commit ee78d21

Please sign in to comment.