holo-generators - dynamically generate resource files for other plugins
Generators are executable files placed under /usr/share/holo/generators
. Holo will execute generators in lexical order before asking plugins to scan their resource files. An output directory will be supplied to each generator in the environment variable $OUT
. Except for caching purposes (see below), generators shall only write to $OUT/
.
The structure under $OUT/
is the same as for static resource files under /usr/share/holo/
. For example, to generate resource files for holo-files(8), a generator may place files at $OUT/files/
.
Generated files placed under $OUT/
and static files under /usr/share/holo/
will be made available to plugins, with generated files taking precedence over static files. For instance, if a generator places a file at $OUT/files/20-webserver/etc/nginx/nginx.conf
, the holo-files(8) plugin will see this file in its $HOLO_RESOURCE_DIR
instead of /usr/share/holo/files/20-webserver/etc/nginx/nginx.conf
.
Besides $OUT
, generators are provided with the following environment variables.
$HOLO_RESOURCE_ROOT
(default: $HOLO_ROOT_DIR/usr/share/holo
)Where all static resource files are located. Static resource files for a specific plugin are in $HOLO_RESOURCE_ROOT/$PLUGIN_ID/
.
$HOLO_CACHE_DIR
(default: below ${TMPDIR:-/tmp}
)Where the generator may store temporary data. Holo will create this directory for the generator, and clean it up after the generator has exited.
holo(8) provides the user interface for this functionality.
Peter Werner, Stefan Majewsky
Further documentation is available at the project homepage: https://holocm.org
Please report any issues and feature requests at GitHub: https://github.com/holocm/holo/issues