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

syncthing/run: Set gui-address to first IP in container #426

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading