1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Check if script already in network affects before adding it

This commit is contained in:
Ycarus 2018-06-25 09:15:59 +02:00
parent 1e62c383f2
commit de716dd92d
4 changed files with 27 additions and 7 deletions

View file

@ -39,7 +39,12 @@ uci -q batch <<-EOF
delete ucitrack.@mptcp[-1]
add ucitrack mptcp
set ucitrack.@mptcp[-1].init=mptcp
add_list ucitrack.@network[-1].affects=mptcp
commit ucitrack
EOF
if [ "$(uci -q get ucitrack.@network[-1].affects | grep mptcp)" = "" ]; then
uci -q batch <<-EOF
add_list ucitrack.@network[-1].affects=mptcp
commit ucitrack
EOF
fi
exit 0