persist env variables on startup. conform to /bin/sh

This commit is contained in:
Kristian Haugene
2015-05-24 20:40:25 +02:00
parent 0d918b22f9
commit 8a3a0b30e9
6 changed files with 86 additions and 4 deletions

View File

@@ -1,5 +1,8 @@
#!/bin/sh
# Source our persisted env variables from container startup
. /etc/transmission-daemon/environment-variables.sh
tun0ip=$(ifconfig tun0 | sed -n '2 p' | awk '{print $2}' | cut -d: -f2)
echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to tun0 ip: ${tun0ip}"
export TRANSMISSION_BIND_ADDRESS_IPV4=${tun0ip}