hooks_dir
hooks_dir
¶
OCI hooks directory discovery.
Reads containers.conf to figure out where podman would look for
global hook descriptors, and reports whether shield's own hook is
installed in any of them.
HOOK_JSON_FILENAME = 'terok-shield-createRuntime.json'
module-attribute
¶
find_hooks_dirs()
¶
Find hooks directories podman would check.
Reads containers.conf (user config overrides system config).
Returns the configured directories in precedence order (last wins
for podman). Empty when no hooks_dir entry is configured —
terok always patches containers.conf at setup time, so an
empty result implies setup has not run.
Source code in src/terok_shield/podman_info/hooks_dir.py
has_global_hooks(hooks_dirs=None)
¶
Check if terok-shield hooks are installed in any global hooks dir.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hooks_dirs
|
list[Path] | None
|
Directories to check (default: auto-detect via
|
None
|
Source code in src/terok_shield/podman_info/hooks_dir.py
global_hooks_hint()
¶
Short hint telling the user to run terok-shield setup.