diff options
author | Christian Hesse <mail@eworm.de> | 2020-03-05 09:17:19 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-03-05 09:17:19 +0100 |
commit | e104b54bf0b48fae9b2d5002f86bf6de39aa0770 (patch) | |
tree | fba54248a445790540cd587ed8796874b809c584 | |
parent | 970641a9740fbe8e42acff44fcfdefaadaf35f24 (diff) |
hotspot-to-wpa: use $LogPrintExit and add more logging
-rw-r--r-- | hotspot-to-wpa | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hotspot-to-wpa b/hotspot-to-wpa index 5f21878..aa1430a 100644 --- a/hotspot-to-wpa +++ b/hotspot-to-wpa @@ -4,6 +4,8 @@ # # add private WPA passphrase after hotspot login +:global LogPrintExit; + :local MacAddress $"mac-address"; :local UserName $username; :local Date [ / system clock get date ]; @@ -11,10 +13,13 @@ :if ([ / caps-man access-list print count-only where comment="--- hotspot-to-wpa above ---" disabled ] = 0) do={ / caps-man access-list add comment="--- hotspot-to-wpa above ---" disabled; - log warn "Added disabled access-list entry with comment '--- hotspot-to-wpa above ---'."; + $LogPrintExit warning "Added disabled access-list entry with comment '--- hotspot-to-wpa above ---'." false; } :local PlaceBefore [ / caps-man access-list find where comment="--- hotspot-to-wpa above ---" disabled ]; +$LogPrintExit info ("Adding/updating accesslist entry for mac address " . $MacAddress . \ + " (user " . $UserName . ").") false; + / caps-man access-list remove [ find where mac-address=$MacAddress comment~"^hotspot-to-wpa: " ]; :local Limits [ / caps-man access-list get $PlaceBefore ]; |