Skip to end of metadata
Go to start of metadata

The general.json is the central configuration object of LoxBerry beginning with LoxBerry 2.0.2. In all versions before LoxBerry 2.0.2, the general.cfg (ini-style config file) was the primary configuration object of LoxBerry (and is automatically generated also by LoxBerry 2.0.2+).

The general.json includes all the configuration done in the widgets, including the Miniservers and it's network settings and credentials. For Perl and PHP users, it is recommended to use the library functions from LoxBerry::System (Perl) and loxberry_system.php (PHP), as they provide on-the-fly calculated information like your plugin directory and resolved network settings of the Miniservers. With other languages, like Python or Node.js, read the general.json.

The general.json (and general.cfg too) by design is thought to be read-only for plugin developers. Reading of the file is allowed, changes are forbidden.

Configuration settings

This is a mapping table of all general.json settings and general.cfg settings. Not all settings of general.json are present in general.cfg (and vice versa) because of new features. Key names in general.json are always first-letter-uppercase (e.g. Base.Sendstatistic, or Ipv4address), in general.cfg everything is capital letters (e.g. BASE.SENDSTATISTIC). Key names are not equal in all cases. Note, that LoxBerry::System/loxberry_system.php functions like get_miniservers use other casing for the values.

general.json introduced hierarchy of objects, that were not possible in the ini format. The general.json - like general.cfg - still maintains main sections as objects,, e.g. Base, Miniserver, Network.

Settings and mapping

general.jsonLB versiongeneral.cfgConfigured byPossible valuesDescription
Base2.0.2+BASE


Base.Clouddnsuri
CLOUDDNSImage

Base.Lang
LANGMy LoxBerry
ISO-Code of users selected language
Base.Sendstatistic
SENDSTATISTICMy LoxBerry

Base.Startsetup
STARTSETUPWizard

Base.Systemloglevel
SYSTEMLOGLEVELImage

Base.Version
VERSIONImage & LoxBerry Update

Base.ImageVersion
n/aImage
The inital version LoxBerry was installed.
n/a
MINISERVERSMiniserver widget1-xThe number of Miniserver entries as [MINISERVERx].
Not required in general.json
n/a
INSTALLFOLDERImage<Path>LoxBerrys base folder /opt/loxberry
Not required anymore, use $ENV{'LBHOMEDIR'}
Log2Ram2.0.0+n/a


Log2ram.Compalg




Log2ram.Logdisksize




Log2ram.Manualconfigured




Log2ram.Ramlog




Log2ram.Size




Log2ram.Zl2r




Network2.0.2+NETWORK


Network.Friendlyname
FRIENDLYNAME


Network.Interface
INTERFACE


Network.Ssid
SSID


Network.Wpa
WPA


Network.Ipv4.Dns
DNS


Network.Ipv4.Gateway
GATEWAY


Network.Ipv4.Ipaddress
IPADDRESS


Network.Ipv4.Mask
MASK


Network.Ipv4.Type
TYPE


Network.Ipv6.Dns
DNS_IPv6


Network.Ipv6.Ipaddress
IPADDRESS_IPv6


Network.Ipv6.Mask
MASK_IPv6


Network.Ipv6.Privacyext
PRIVACYEXT_IPv6


Network.Ipv6.Type
TYPE_IPv6


Remote1.4.0+n/a


Remote.Autoconnect




Remote.Httpport




Remote.Httpproxy




Ssdp2.0.2+SSDP


Ssdp.Disabled
DISABLED


Ssdp.Uuid
UUID


Timeserver2.0.2+TIMESERVER


Timeserver.Method
METHOD


Timeserver.Ntpserver
SERVER


Timeserver.Timemsno
n/a


Timeserver.Timezone
ZONE


Update2.0.2+UPDATE


Update.Branch
BRANCH

Default branch is 'master'. To update from a specific branch, set the branch name here.
Update.Dryrun
DRYRUN

No changes are made, no update scripts are run. (DEBUGGING)
Update.Failedscript
FAILED_SCRIPT

If one or more update scripts fail during LoxBerry Update, this value stores the lowest version number (the version number of the first failed update script)  
Update.Installtype
INSTALLTYPE


Update.Interval
INTERVAL


Update.Keepinstallfiles
KEEPINSTALLFILES

Does not delete the downloaded and unzipped files. They stay in the /tmp/... directory. (DEBUGGING)
Update.Keepupdatefiles
KEEPUPDATEFILES

Updates LoxBerry, but does not overwrite loxberryupdatecheck.pl and loxberryupdate.pl (DEBUGGING)
Update.Latestsha
LATESTSHA

If installtype is Latest, stores the last commit sha that was installed. Required to detect if a new commit is present.
Update.Releasetype
RELEASETYPE


Watchdog1.4.0+n/a


Watchdog.Enable




Watchdog.Logging




Watchdog.Ping




Watchdog.Maxload1




Watchdog.Maxload5




Watchdog.Maxload15




Watchdog.Minmem




Watchdog.Maxtemp




Watchdog.Tempsensor




Webserver2.0.2+WEBSERVER


Webserver.Port
PORT


Webserver.Porthttps
n/a


Miniserver2.0.2+MINISERVERxMiniserver widget

"x" is a string label with the number, The "x" object holds the data of each Miniserver



In general.json, each Miniserver is an object, named by the number ("1", "2",...)
In general.cfg, each Miniserver has a section [MINISERVERx], where x is starting at 1, maximal count in BASE.MINISERVERS
Miniserver.x.Admin
ADMIN


Miniserver.x.Admin_raw
ADMIN_RAW


Miniserver.x.Cloudurl
CLOUDURL


Miniserver.x.Cloudurlftpport
CLOUDURLFTPPORT


Miniserver.x.Credentials
CREDENTIALS


Miniserver.x.Credentials_raw
CREDENTIALS_RAW


Miniserver.x.Encryptresponse
ENCRYPTRESPONSE


Miniserver.x.Fulluri
n/a


Miniserver.x.Fulluri_raw
n/a


Miniserver.x.Ipaddress
IPADDRESS


Miniserver.x.Ipv6format
n/a


Miniserver.x.Name
NAME


Miniserver.x.Note
NOTE


Miniserver.x.Pass
PASS


Miniserver.x.Pass_raw
PASS_RAW


Miniserver.x.Port
PORT


Miniserver.x.Porthttps
n/a


Miniserver.x.Preferhttps
n/a


Miniserver.x.Securegateway
SECUREGATEWAY


Miniserver.x.Transport
n/a


Miniserver.x.Useclouddns
USECLOUDDNS


Perl Modul LoxBerry::System::General

  • No labels