Read from sourced environment variables instead of argument

This commit is contained in:
Kristian Haugene
2020-08-22 15:24:42 +02:00
parent f5a305bb8e
commit 0748445400

View File

@@ -12,7 +12,7 @@ transmission_settings_file=${TRANSMISSION_HOME}/settings.json
# Calculate the port # Calculate the port
IPADDRESS=$1 IPADDRESS=$TRANSMISSION_BIND_ADDRESS_IPV4
echo "ipAddress to calculate port from $IPADDRESS" echo "ipAddress to calculate port from $IPADDRESS"
oct3=$(echo ${IPADDRESS} | tr "." " " | awk '{ print $3 }') oct3=$(echo ${IPADDRESS} | tr "." " " | awk '{ print $3 }')
oct4=$(echo ${IPADDRESS} | tr "." " " | awk '{ print $4 }') oct4=$(echo ${IPADDRESS} | tr "." " " | awk '{ print $4 }')