This commit is contained in:
Morozov Dmitriy
2024-06-04 13:26:36 +00:00
committed by GitHub
2 changed files with 37 additions and 19 deletions

View File

@@ -518,13 +518,19 @@ start () {
EOF EOF
cat << 'EOF' >> /etc/init.d/getdomains cat << 'EOF' >> /etc/init.d/getdomains
count=0 count=0
maxCount=10
while true; do while true; do
if [ ${count} -eq ${maxCount} ]; then
echo "Break on ${maxCount} attempt"
break
fi
if curl -m 3 github.com; then if curl -m 3 github.com; then
curl -f $DOMAINS --output /tmp/dnsmasq.d/domains.lst curl -f $DOMAINS --output /tmp/dnsmasq.d/domains.lst
break break
else else
echo "GitHub is not available. Check the internet availability [$count]" echo "GitHub is not available. Check the internet availability [$count]"
count=$((count+1)) count=$((count+1))
sleep 5
fi fi
done done

View File

@@ -22,13 +22,19 @@ start () {
DOMAINS=https://raw.githubusercontent.com/itdoginfo/allow-domains/main/Ukraine/inside-dnsmasq-ipset.lst DOMAINS=https://raw.githubusercontent.com/itdoginfo/allow-domains/main/Ukraine/inside-dnsmasq-ipset.lst
{% endif %} {% endif %}
count=0 count=0
maxCount=10
while true; do while true; do
if [ ${count} -eq ${maxCount} ]; then
echo "Break on ${maxCount} attempt"
break
fi
if curl -m 3 github.com; then if curl -m 3 github.com; then
curl -f $DOMAINS --output /tmp/dnsmasq.d/domains.lst curl -f $DOMAINS --output /tmp/dnsmasq.d/domains.lst
break break
else else
echo "GitHub is not available. Check the internet availability [$count]" echo "GitHub is not available. Check the internet availability [$count]"
count=$((count+1)) count=$((count+1))
sleep 5
fi fi
done done
@@ -46,7 +52,12 @@ start () {
mkdir -p $dir mkdir -p $dir
count=0 count=0
maxCount=10
while true; do while true; do
if [ ${count} -eq ${maxCount} ]; then
echo "Break on ${maxCount} attempt"
break
fi
if curl -m 3 https://antifilter.download/; then if curl -m 3 https://antifilter.download/; then
{% if list_subnet %} {% if list_subnet %}
curl -f -z $dir/subnet.lst https://antifilter.download/list/subnet.lst --output $dir/subnet.lst curl -f -z $dir/subnet.lst https://antifilter.download/list/subnet.lst --output $dir/subnet.lst
@@ -61,6 +72,7 @@ start () {
else else
echo "antifilter.download is not available. Check the internet availability [$count]" echo "antifilter.download is not available. Check the internet availability [$count]"
count=$((count+1)) count=$((count+1))
sleep 5
fi fi
done done