Create config file in uci-defaults

This may solve #114
This commit is contained in:
Vadim Vetrov 2024-09-14 17:38:37 +03:00
parent 0c08d7c5f2
commit de1cfab8cd
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5

View File

@ -1,5 +1,6 @@
#!/bin/sh
[[ ! "$(uci -q get youtubeUnblock.youtubeUnblock)" == "" ]] && exit 0
touch /etc/config/youtubeUnblock
uci batch << EOI
set youtubeUnblock.youtubeUnblock='youtubeUnblock'
set youtubeUnblock.youtubeUnblock.frag='tcp'
@ -25,4 +26,4 @@ add_list youtubeUnblock.youtubeUnblock.sni_domains='l.google.com'
EOI
uci commit
/etc/init.d/firewall restart &>/dev/null
exit 0 # IMPORTANT, IF WE NO PUT THIS, WILL EXECUTED ENDLESSLY
exit 0