aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* helper for creating/editing config filesAndré Erdmann2014-01-261-0/+1
./bin/py/query_config (currently accessible via ./bin/query_config in the git repo, and not available if roverlay is installed) is a script for (a) accessing roverlay's config in shell-usable format: eval $(query_config OVERLAY_DIR OVERLAY_NAME) (b) replacing variables in file templates (@@VARNAME@@): query_config --config-file ~user/roverlay/R-overlay.conf \ --from-file <template file> -O <outfile> This can be used to create config file templates without having to worry about the actual file paths / server address / etc., for example (nginx, server{} block): server { listen @@NGINX_SERVER_ADDR@@; server_name @@NGINX_SERVER_NAME@@; ... # package mirror dir root @@OVERLAY_DISTDIR_ROOT@; ... } (NGINX_SERVER_ADDR and NGINX_SERVER_NAME would have to be given with the -v/--variable switch when calling query_config). The exit code indicates whether all variables could be replaced or not. TODO: * make config option aliases available for (b) (e.g. DISTDIR) * doc * script name * config templates