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 authored Aug 27, 2023
1 parent 37d2f7c commit bb53b05
Showing 1 changed file with 10 additions and 1 deletion.
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 "$var" ]
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 bb53b05

Please sign in to comment.