Skip to content

Command line ​

text
anolis-runtime [--config PATH] [--check-config PATH] [--version] [--help]
OptionEffect
--config PATH, --config=PATHRun with this config file. Default: anolis-runtime.yaml in the current directory.
--check-config PATHLoad and validate the config file, then exit without starting anything.
--version, -VPrint anolis-runtime <version> and exit.
--help, -hPrint the options and exit.

Any other argument is an error: the runtime prints Unknown argument: <arg> and exits with code 1.

A relative path in the config, such as a provider's command, is resolved against the current directory, not the config file's directory.

Checking a config ​

bash
anolis-runtime --check-config anolis-runtime.yaml

On success it prints a summary line, starting Config valid:, and exits 0. On failure it prints ERROR: with the reason and exits 1. It does not start providers, so it cannot catch a provider's own config errors; check those with the provider's --check-config.

Environment variables ​

VariableUsed when
ANOLIS_API_TOKENhttp.auth_enabled is true and the config sets no http.auth_token
INFLUXDB_TOKENtelemetry.enabled is true and the config sets no InfluxDB token

install.sh writes ANOLIS_API_TOKEN into /etc/anolis/runtime.env for the systemd unit, and with --with-observability also INFLUXDB_TOKEN.

Stopping ​

SIGINT (Ctrl+C) and SIGTERM stop the runtime: it stops the HTTP server and shuts down each provider, waiting up to runtime.shutdown_timeout_ms.

Exit codes ​

CodeMeaning
0Normal shutdown, or --check-config, --version or --help succeeded
1Unknown argument, missing or invalid config, or a startup failure

The signal handlers are installed once startup finishes, so SIGINT or SIGTERM while providers are still starting ends the process by the signal instead (#559).