mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
12 lines
368 B
Bash
Executable File
12 lines
368 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/ad.conf
|
|
elif (grep -wq "0.0.0.0" /tmp/adnew.conf) ; then
|
|
cp /tmp/adnew.conf /tmp/ad.conf
|
|
else
|
|
cat /tmp/adnew.conf | grep ^\|\|[^\*]*\^$ | sed -e 's:||:address\=\/:' -e 's:\^:/0\.0\.0\.0:' > /tmp/ad.conf
|
|
fi
|
|
fi
|
|
rm -f /tmp/adnew.conf
|