diff --git a/README.md b/README.md index 74b80e3..22b384f 100644 --- a/README.md +++ b/README.md @@ -232,6 +232,10 @@ of this parameter has the format `=`. `FAM_GEOID_SOURCE` Sets the `$globalGeoidSource` variable in `require/settings.php`. Default `egm96-15`. Optional. +`FAM_ENABLE_ACARS` Sets the `$globalACARS` variable in `require/settings.php`. Default `false`. Optional. + +`FAM_GLOBAL_URL` Sets the `$globalURL` variable in `require/settings.php`. Default is unset. Sets the URL pathing for asset requests. Useful for running FAM behind a proxy. No trailing `/`. Optional. + If you wish to use an external database: `MYSQLHOSTNAME` Sets the hostname of the mysql/mariadb server. diff --git a/rootfs/etc/s6-overlay/scripts/03-settings b/rootfs/etc/s6-overlay/scripts/03-settings index 10aa2cc..1ccd7c8 100755 --- a/rootfs/etc/s6-overlay/scripts/03-settings +++ b/rootfs/etc/s6-overlay/scripts/03-settings @@ -197,4 +197,16 @@ search="\$globalGeoidSource = '" replace="\$globalGeoidSource = '${FAM_GEOID_SOURCE}';" sed -i "/${search}/c\\${replace}" /var/www/flightairmap/htdocs/require/settings.php +if chk_enabled "${FAM_ENABLE_ACARS}"; then + search="\$globalACARS = FALSE;" + replace="\$globalACARS = TRUE;" + sed -i "/${search}/c\\${replace}" /var/www/flightairmap/htdocs/require/settings.php +fi + +if chk_enabled "${FAM_GLOBAL_URL}"; then + search="\$globalURL = '" + replace="\$globalURL = '${FAM_GLOBAL_URL}';" + sed -i "/${search}/c\\${replace}" /var/www/flightairmap/htdocs/require/settings.php +fi + echo ""