Karsten Böddeker 1335c78e88 ffho-site-generate: fix ok => or 7 yıl önce
..
files 3f8381d864 Minify all Lua code 8 yıl önce
luasrc 1335c78e88 ffho-site-generate: fix ok => or 7 yıl önce
scripts 5183706fd8 ffho-site-genrate: introduce new strategy for config generation 8 yıl önce
Makefile 06b63d016c ffho-site-generate: update + code improvements 7 yıl önce
ReadMe.md 2b81274f18 ffho-site-generate: fix typo 7 yıl önce

ReadMe.md

ffho-site-generate

This package generates the needed site.json directly on the node after firmware upgrade has been performed. This can be used, to support different sites/regions within one firmware image. The default site.json will be replaced by site/extra/template.conf which is partially replaced by values defined in site/extra/sites.conf and site/extra/groups.conf.

One can generate the site.conf before build with: GLUON_SITEDIR=$PATH ./scripts/gen-site-conf.lua

This does not belong to the site.mk.

/etc/config/currentsite

currentsite.current.name:

  • Site, the node belogs to

example

config site 'current'
	option name 'ffho_abn'

site/extra/sites.conf

Array of possible sites, containing site specific configuration different to the original site.conf and group specific config. Same configuration as in the site.conf can be done here.

site_select.group: optional

  • specify a group out of site/extra/groups.conf the site belongs to

example

{
  {
    site_name = 'Freifunk Hochstift - Altenbeken',
    site_code = 'ffho_abn',
    subst = {
      ['%%ID'] = 1,
      ['%%CD'] = 'abn',
    },
    site_select = {
      group = 'ffho_ost',
    },
  },
  ...
}

site/extra/groups.conf

Array of groups, containing group specific configuration different to the original site.conf. Same configuration as in the site.conf can be done here.

example

{
  ffho_ost = {
    subst = {
      ['%%V4'] = '10.132.xxx.0/21',
      ['%%V6'] = '2a03:2260:2342:2303::/64',
      ...
    },
  },
  ...
}

site/extra/default.conf

An array, containing the default configuration, to create site.conf out of template.conf before build.

example

subst = {
  ['%%SN'] = 'Bitte wählen',
  ['%%SC'] = 'ffho',
  ['%%SS'] = 'paderborn.freifunk.net',
  ...
}