Initialize TRACK_OUTPUT has been set after INTERFACE variable initialization.
Move definition into main fixes this issue.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
IFDOWN_EVENT=0
IFUP_EVENT=0
-TRACK_OUTPUT=$MWAN3TRACK_STATUS_DIR/$INTERFACE/TRACK_OUTPUT
-
-mwan3_init
stop_subprocs() {
[ -n "$SLEEP_PID" ] && kill "$SLEEP_PID" && unset SLEEP_PID
INTERFACE=$1
STATUS=""
STARTED=0
+ TRACK_OUTPUT=$MWAN3TRACK_STATUS_DIR/$INTERFACE/TRACK_OUTPUT
+
+ mwan3_init
+
mkdir -p $MWAN3TRACK_STATUS_DIR/$INTERFACE
trap clean_up TERM