mirror of
https://github.com/wangyu-/udp2raw.git
synced 2025-01-20 06:49:32 +08:00
24 lines
486 B
Plaintext
24 lines
486 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
uci -q batch <<-EOF >/dev/null
|
||
|
delete ucitrack.@udp2raw[-1]
|
||
|
add ucitrack udp2raw
|
||
|
set ucitrack.@udp2raw[-1].init=udp2raw
|
||
|
commit ucitrack
|
||
|
EOF
|
||
|
|
||
|
general=$(uci -q get udp2raw.@general[-1])
|
||
|
if [ -z "$general" ]; then
|
||
|
uci -q add udp2raw general
|
||
|
fi
|
||
|
if [ ."$general" != ."general" ]; then
|
||
|
uci -q batch <<-EOF >/dev/null
|
||
|
rename udp2raw.@general[-1]="general"
|
||
|
set udp2raw.general.server="nil"
|
||
|
commit udp2raw
|
||
|
EOF
|
||
|
fi
|
||
|
|
||
|
rm -rf /tmp/luci-indexcache /tmp/luci-modulecache
|
||
|
exit 0
|