lede/package/lean/luci-app-ssr-plus/root/usr/bin/ssr-ad
Mattraks a10390cc21
luci-app-ssr-plus:Code optimization and Fix Bug (#4253)
* luci-app-ssr-plus:Code optimization and Fix Bug

* luci-app-ssr-plus:Adjust reference data location
2020-04-11 21:53:11 +08:00

10 lines
284 B
Bash
Executable File

#!/bin/sh -e
if [ -f /tmp/adnew.conf ]; then
if (grep -wq "address=" /tmp/adnew.conf); then
cp /tmp/adnew.conf /tmp/ssr-update.$1
else
cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' >/tmp/ssr-update.$1
fi
fi
rm -f /tmp/adnew.conf