Skip to content
Snippets Groups Projects
Commit ed9533f4 authored by Bob Mottram's avatar Bob Mottram
Browse files

Count down

parent addc78a3
No related branches found
No related tags found
No related merge requests found
......@@ -140,7 +140,7 @@ ICECAST_JINGLES=/jingles
liquidsoap_script=/etc/liquidsoapuser/radio.liq
webadmin_ipv4_address=
webadmin_monitor_ip_ctr=0
webadmin_monitor_ip_ctr=1
function get_external_ipv4_address {
ipv4_result=$(curl -s ipinfo.io/ip)
......@@ -2639,9 +2639,9 @@ function webadmin_monitor_ip_changes {
if [ -f "$webadmin_install_dir/dynamicdns.html" ]; then
ONION_ONLY=$(grep 'ONION_ONLY=' "$CONFIGURATION_FILE" | head -n 1 | awk -F '=' '{print $2}')
if [[ "$ONION_ONLY" == 'no' ]]; then
webadmin_monitor_ip_ctr=$((webadmin_monitor_ip_ctr+1))
if [ $webadmin_monitor_ip_ctr -gt 300 ]; then
webadmin_monitor_ip_ctr=0
webadmin_monitor_ip_ctr=$((webadmin_monitor_ip_ctr-1))
if [ $webadmin_monitor_ip_ctr -le 0 ]; then
webadmin_monitor_ip_ctr=300
curr_ipv4=$(get_external_ipv4_address)
if [ "$curr_ipv4" ]; then
if [[ "$curr_ipv4" != "$webadmin_ipv4_address" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment