From 44d92a826a8789060fc08a8b60ccff77f42941f5 Mon Sep 17 00:00:00 2001 From: Robert Günzler Date: Mon, 22 Sep 2025 20:12:34 +0200 Subject: support generating services at runtime MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Robert Günzler --- bin/svtree-compile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/svtree-compile') 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" -- cgit 1.4.1