diff --git a/files/www/cgi-bin/admin b/files/www/cgi-bin/admin index cabe7c6d..0adf4eac 100755 --- a/files/www/cgi-bin/admin +++ b/files/www/cgi-bin/admin @@ -447,12 +447,19 @@ if($parms{button_location}) { system "echo '$parms{gridsquare}' > /etc/gridsquare" if $parms{gridsquare}; push @loc_output, "Gridsquare updated.\n"; + } else { + system "rm -f /etc/gridsquare"; + push @loc_output, "Gridsquare purged.\n"; } + if($parms{latitude} and $parms{longitude}) { system "echo '$parms{latitude}' > /etc/latlon"; system "echo '$parms{longitude}' >> /etc/latlon"; push @loc_output, "Lat/Lon updated.\n"; + } else { + system "rm -f /etc/latlon"; + push @loc_output, "Lat/Lon purged.\n"; } }