summarylogtreecommitdiffstats
path: root/freedns-daemon.sh
blob: 0d94c3ce8784dd80371689a42910752c6f94128a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash


if [ -z "$1" ]; then
	file="/etc/freedns-daemon/urls"
else
	file=$1
fi

while true;
do
	while read line; do
	
		echo "readed: $line"
		#do not execute comments
		if [[ "$line" != \#* ]];then
			echo "curling: $line"
			#do execute that
			curl --max-time 10 --retry 5 --retry-delay 10 $line &
		fi
		
	done <"$file"
	sleep 1h
done