diff --git a/defaults.inc b/defaults.inc index 9340b81e..269f0783 100755 --- a/defaults.inc +++ b/defaults.inc @@ -28,6 +28,7 @@ M_SRVCOPT=(start stop restart reload enable disable) source ${PW_FOLDER}/conf/settings.conf + IP=$(ip addr show $(ip route | awk '/default/ { print $5 }') | grep "inet" | head -n 1 | awk '/inet/ {print $2}' | cut -d'/' -f1) # if [[ "${IP}" = "10.2.1."* ]]; then mqtt_conn="/usr/bin/mosquitto_sub -h ${PW_IP} -u ${PW_MQTT_USER} -P ${PW_MQTT_PASS}"