diff options
| author | Robert Günzler <r@gnzler.io> | 2025-09-22 20:12:34 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2025-09-22 20:14:59 +0200 |
| commit | 44d92a826a8789060fc08a8b60ccff77f42941f5 (patch) | |
| tree | f26b2529a2a757caae2d669e0a185755e5eec205 /bin/svtree-compile | |
| parent | ded78d4e64f8aedc88ad1cad26ee7a1bcf531cb7 (diff) | |
support generating services at runtime
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bin/svtree-compile')
| -rwxr-xr-x | bin/svtree-compile | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/svtree-compile b/bin/svtree-compile index 3e8e63c..aba4f1d 100755 --- a/bin/svtree-compile +++ b/bin/svtree-compile @@ -4,6 +4,7 @@ set -eu LIVE_DIR=${LIVE_DIR:-/run/s6-rc} STATE_DIR=${STATE_DIR:-/etc/s6-rc} SOURCE_DIR=${SOURCE_DIR:-/etc/s6-rc/src} +GENERATED_DIR=${SOURCE_DIR:-/run/svtree-generated} new_dir="$STATE_DIR"/"_$(date +%s)" @@ -12,7 +13,7 @@ main() { old="$(find "$STATE_DIR" -maxdepth 1 -name '_[0-9]*' -print)" # compile new db - s6-rc-compile "$new_dir" "$SOURCE_DIR" + s6-rc-compile "$new_dir" "$SOURCE_DIR" "$GENERATED_DIR" # switch to new db (if there's an active tree) test -e "$LIVE_DIR" && s6-rc-update -v2 -l "$LIVE_DIR" -b "$new_dir" |