|
@@ -3,8 +3,11 @@ ffho-site-generate
|
|
|
|
|
|
This package generates the needed `site.json` directly on the node after firmware
|
|
|
upgrad has been performed. This can be used, to support different sites/regions
|
|
|
-within one firmware image. The default `site.json` is partially overridden by the
|
|
|
-variables defined in `site/extra/sites.conf` and `site/extra/groups.conf`.
|
|
|
+within one firmware image. The default `site.json` will be replaced by
|
|
|
+`site/extra/template.conf` which is patly replacte 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`.
|
|
|
|
|
@@ -36,15 +39,9 @@ can be done here.
|
|
|
{
|
|
|
site_name = 'Freifunk Hochstift - Altenbeken',
|
|
|
site_code = 'ffho_abn',
|
|
|
- wifi24 = {
|
|
|
- ap = {
|
|
|
- ssid = 'hochstift.freifunk.net/altenbkn',
|
|
|
- },
|
|
|
- },
|
|
|
- wifi5 = {
|
|
|
- ap = {
|
|
|
- ssid = 'hochstift.freifunk.net/altenbkn',
|
|
|
- },
|
|
|
+ subst = {
|
|
|
+ ['%%ID'] = 1,
|
|
|
+ ['%%CD'] = 'abn',
|
|
|
},
|
|
|
site_select = {
|
|
|
group = 'ffho_ost',
|
|
@@ -64,43 +61,27 @@ site.conf. Same configuration as in the site.conf can be done here.
|
|
|
```
|
|
|
{
|
|
|
ffho_ost = {
|
|
|
- prefix4 = '10.132.xxx.0/21',
|
|
|
- prefix6 = '2a03:2260:2342:2303::/64',
|
|
|
- wifi24 = {
|
|
|
- ibss = {
|
|
|
- ssid = 'ffho-mesh-ost',
|
|
|
- bssid = '02:ff:03:ff:00:24',
|
|
|
- },
|
|
|
- },
|
|
|
- wifi5 = {
|
|
|
- ibss = {
|
|
|
- ssid = 'ffho-mesh-ost',
|
|
|
- bssid = '02:ff:03:ff:00:05',
|
|
|
- },
|
|
|
- },
|
|
|
- next_node = {
|
|
|
- ip4 = '10.132.xxx.1',
|
|
|
- ip6 = '2a03:2260:2342:2303::1',
|
|
|
- mac = '02:ff:03:ff:00:00',
|
|
|
- },
|
|
|
- fastd_mesh_vpn = {
|
|
|
- groups = {
|
|
|
- backbone = {
|
|
|
- peers = {
|
|
|
- gw01 = {
|
|
|
- key = 'GW01_KEY',
|
|
|
- remotes = {
|
|
|
- '"gw01.ffho.net" port 10003',
|
|
|
- ...
|
|
|
- },
|
|
|
- },
|
|
|
- ...
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
+ 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',
|
|
|
+ ...
|
|
|
+}
|
|
|
+```
|