Skip to content
Snippets Groups Projects
Commit c3f25de7 authored by rubo77's avatar rubo77
Browse files

add site.conf validy check

parent 7d35fa72
Branches
Tags
No related merge requests found
...@@ -15,6 +15,7 @@ Adapt and add this block to your site.conf: ...@@ -15,6 +15,7 @@ Adapt and add this block to your site.conf:
``` ```
ssid_changer = { ssid_changer = {
enabled = true,
switch_timeframe = 30, -- only once every timeframe (in minutes) the SSID will change to OFFLINE switch_timeframe = 30, -- only once every timeframe (in minutes) the SSID will change to OFFLINE
-- set to 1440 to change once a day -- set to 1440 to change once a day
-- set to 1 minute to change every time the router gets offline -- set to 1 minute to change every time the router gets offline
...@@ -22,11 +23,11 @@ ssid_changer = { ...@@ -22,11 +23,11 @@ ssid_changer = {
prefix = 'FF_OFFLINE_', -- use something short to leave space for the nodename (no '~' allowed!) 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' 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 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 -- 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. -- 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_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_min = 35 -- lower limit, below that the offline SSID will be used
}, },
``` ```
......
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment