mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00

* luci-app-ssr-plus:Code optimization and Fix Bug * luci-app-ssr-plus:Adjust reference data location
10 lines
384 B
Bash
Executable File
10 lines
384 B
Bash
Executable File
#!/bin/sh
|
|
LOCK_FILE="/var/lock/ssr-chinaipset.lock"
|
|
[ -f "$LOCK_FILE" ] && exit 2
|
|
touch "$LOCK_FILE"
|
|
echo "create china hash:net family inet hashsize 1024 maxelem 65536" > /tmp/china.ipset
|
|
awk '!/^$/&&!/^#/{printf("add china %s'" "'\n",$0)}' /etc/china_ssr.txt >> /tmp/china.ipset
|
|
ipset -! flush china
|
|
ipset -! restore < /tmp/china.ipset 2>/dev/null
|
|
rm -f /tmp/china.ipset $LOCK_FILE
|