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

add upgrade script and empty config file for uci and fill it with variables from the site.conf

- added gluon luasrc diet to lua upgrade script
parent 6266c4a0
Branches
Tags
No related merge requests found
...@@ -31,10 +31,12 @@ define Build/Configure ...@@ -31,10 +31,12 @@ define Build/Configure
endef endef
define Build/Compile define Build/Compile
$(call GluonSrcDiet,./luasrc,$(PKG_BUILD_DIR)/luadest/)
endef endef
define Package/gluon-ssid-changer/install define Package/gluon-ssid-changer/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
$(CP) $(PKG_BUILD_DIR)/luadest/* $(1)/
./gluonShellDiet.sh $(1)/lib/gluon/ssid-changer/ssid-changer.sh ./gluonShellDiet.sh $(1)/lib/gluon/ssid-changer/ssid-changer.sh
endef endef
......
config main 'settings'
#!/usr/bin/lua
local site = require 'gluon.site_config'
local legacy_uci = require 'luci.model.uci'
local uci = legacy_uci.cursor()
-- LEDE: local uci = require('simple-uci').cursor()
if not uci:get('ssid-changer', 'settings', 'enabled') then
uci:section('ssid-changer', 'main', 'settings', {
enabled = '1',
switch_timeframe = site.switch_timeframe or '1',
first = site.first or '5',
prefix = site.prefix or 'FF_OFFLINE_',
suffix = site.suffix or 'nodename',
tq_limit_enabled = site.tq_limit_enabled or '0',
tq_limit_max = site.tq_limit_max or '55',
tq_limit_min = site.tq_limit_min or '45',
})
end
uci:save('ssid-changer')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment