Skip to content

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 committed Aug 28, 2023
1 parent 37d2f7c commit 17d8d93
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 4 additions & 0 deletions syncthing/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.xx.x - 2023-xx-xx

* 🔨Set gui-address to first IP in container (#426)

## 1.16.3 - 2023-07-20

* 🔼 Updated syncthing to `1.23.6-r1` (thanks @salim-b | #394)
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 "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 17d8d93

Please sign in to comment.