Skip to main content

Module paths

Module paths 

Source
Expand description

Path resolution for Starla

Directory resolution priority:

Config directory (for config.toml):

  1. $CONFIGURATION_DIRECTORY (systemd)
  2. Container: /config
  3. $XDG_CONFIG_HOME/starla
  4. Root: /etc/starla, non-root: ~/.config/starla

State directory (for keys, probe_id, known_hosts):

  1. CLI --state-dir (via override)
  2. $STATE_DIRECTORY (systemd)
  3. Container: /state
  4. $XDG_STATE_HOME/starla
  5. Root: /var/lib/starla, non-root: ~/.local/state/starla

Runtime directory (for ephemeral databases, caches):

  1. $RUNTIME_DIRECTORY (systemd)
  2. Container: /run/starla
  3. $XDG_RUNTIME_DIR/starla
  4. Root: /run/starla, non-root: /tmp/starla-<uid>

Functionsยง

config_dir
Get the configuration directory path
config_file
Get the default config file path
ensure_config_dir
Ensure the config directory exists
ensure_dir
Ensure a directory exists, creating it if necessary
ensure_state_dir
Ensure the state directory exists
known_hosts_path
Get the known SSH host keys path
probe_id_path
Get the probe ID file path
probe_key_path
Get the default probe key path
probe_pubkey_path
Get the default probe public key path
read_probe_id
Read the probe ID from the state directory
runtime_dir
Get the runtime directory path (for ephemeral data: databases, caches)
set_runtime_dir
Set the runtime directory override (from --runtime-dir CLI arg). Must be called before any runtime_dir() calls. Subsequent calls are ignored.
set_state_dir
Set the state directory override (from --state-dir CLI arg). Must be called before any state_dir() calls. Subsequent calls are ignored.
state_dir
Get the state directory path (for databases, keys, etc.)
status_socket_path
Get the status socket path (for tray app communication)
write_probe_id
Write the probe ID to the state directory