diff --git a/README.md b/README.md index 92f1e7e59ad77b4e8585bae51e66f7f798ea7c98..877296e37fb4a636faa9c07471475ae82592e781 100644 --- a/README.md +++ b/README.md @@ -40,18 +40,19 @@ Adapt and add this block to your site.conf: ``` ssid_changer = { - switch_timeframe = 30, -- only once every timeframe (in minutes) the SSID will change to the Offline-SSID - -- set to 1440 to change once a day - -- set to 1 minute to change every time the router gets offline - first = 5, -- the first few minutes directly after reboot within which an Offline-SSID always may be activated (must be <= switch_timeframe) - prefix = 'FF_Offline_', -- use something short to leave space for the nodename (no '~' allowed!) - suffix = 'nodename', -- generate the SSID with either 'nodename', 'mac' or to use only the prefix: 'none' + enabled = true, + switch_timeframe = 30, -- only once every timeframe (in minutes) the SSID will change to the Offline-SSID + -- set to 1440 to change once a day + -- set to 1 minute to change every time the router gets offline + first = 5, -- the first few minutes directly after reboot within which an Offline-SSID always may be activated (must be <= switch_timeframe) + prefix = 'FF_Offline_', -- use something short to leave space for the nodename (no '~' allowed!) + suffix = 'nodename', -- generate the SSID with either 'nodename', 'mac' or to use only the prefix: 'none' - tq_limit_enabled = 0, -- if false, the offline SSID will only be set if there is no gateway reacheable - -- upper and lower limit to turn the offline_ssid on and off - -- in-between these two values the SSID will never be changed to prevent it from toggeling every minute. - tq_limit_max = '45', -- upper limit, above that the online SSID will be used - tq_limit_min = '35' -- lower limit, below that the offline SSID will be used + tq_limit_enabled = false, -- if false, the offline SSID will only be set if there is no gateway reacheable + -- upper and lower limit to turn the offline_ssid on and off + -- in-between these two values the SSID will never be changed to prevent it from toggeling every minute. + tq_limit_max = 45, -- upper limit, above that the online SSID will be used + tq_limit_min = 35 -- lower limit, below that the offline SSID will be used }, ``` diff --git a/gluon-ssid-changer/check_site.lua b/gluon-ssid-changer/check_site.lua new file mode 100644 index 0000000000000000000000000000000000000000..cbee310e46f89c248abcfd9577f83af67d38d7c2 --- /dev/null +++ b/gluon-ssid-changer/check_site.lua @@ -0,0 +1,11 @@ +if need_table('ssid_changer', nil, false) then + need_boolean('ssid_changer.enabled', false) + need_number('ssid_changer.switch_timeframe', false) + need_number('ssid_changer.first', false) + need_string('ssid_changer.prefix', false) + need_string('ssid_changer.suffix', false) + if need_boolean('ssid_changer.tq_limit_enabled', false) then + need_number('ssid_changer.tq_limit_max', false) + need_number('ssid_changer.tq_limit_min', false) + end +end