mirror of
https://github.com/itdoginfo/ansible-openwrt-hirkn.git
synced 2026-01-03 05:13:39 +05:00
Compare commits
3 Commits
master
...
2e0dc3b79e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e0dc3b79e | ||
|
|
fb91e5c9f5 | ||
|
|
5625c795ba |
@@ -529,13 +529,19 @@ start () {
|
||||
EOF
|
||||
cat << 'EOF' >> /etc/init.d/getdomains
|
||||
count=0
|
||||
maxCount=10
|
||||
while true; do
|
||||
if [ ${count} -eq ${maxCount} ]; then
|
||||
echo "Break on ${maxCount} attempt"
|
||||
break
|
||||
fi
|
||||
if curl -m 3 github.com; then
|
||||
curl -f $DOMAINS --output /tmp/dnsmasq.d/domains.lst
|
||||
break
|
||||
else
|
||||
echo "GitHub is not available. Check the internet availability [$count]"
|
||||
count=$((count+1))
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
@@ -22,13 +22,19 @@ start () {
|
||||
DOMAINS=https://raw.githubusercontent.com/itdoginfo/allow-domains/main/Ukraine/inside-dnsmasq-ipset.lst
|
||||
{% endif %}
|
||||
count=0
|
||||
maxCount=10
|
||||
while true; do
|
||||
if [ ${count} -eq ${maxCount} ]; then
|
||||
echo "Break on ${maxCount} attempt"
|
||||
break
|
||||
fi
|
||||
if curl -m 3 github.com; then
|
||||
curl -f $DOMAINS --output /tmp/dnsmasq.d/domains.lst
|
||||
break
|
||||
else
|
||||
echo "GitHub is not available. Check the internet availability [$count]"
|
||||
count=$((count+1))
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -46,7 +52,12 @@ start () {
|
||||
mkdir -p $dir
|
||||
|
||||
count=0
|
||||
maxCount=10
|
||||
while true; do
|
||||
if [ ${count} -eq ${maxCount} ]; then
|
||||
echo "Break on ${maxCount} attempt"
|
||||
break
|
||||
fi
|
||||
if curl -m 3 https://antifilter.download/; then
|
||||
{% if list_subnet %}
|
||||
curl -f -z $dir/subnet.lst https://antifilter.download/list/subnet.lst --output $dir/subnet.lst
|
||||
@@ -61,6 +72,7 @@ start () {
|
||||
else
|
||||
echo "antifilter.download is not available. Check the internet availability [$count]"
|
||||
count=$((count+1))
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user