diff options
| author | Robert Günzler <r@gnzler.io> | 2025-09-22 19:14:31 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2025-09-22 19:53:59 +0200 |
| commit | ad3f9dcc42d2d4e643a3acbc5005324623ebd54c (patch) | |
| tree | 6b45572ff943c0fed316158eab668c3220613f81 | |
| parent | d709a2946b006bb6d8f1c4d1cc3b6169f46d4d8b (diff) | |
combine init and run scripts
Signed-off-by: Robert Günzler <r@gnzler.io>
| -rwxr-xr-x | bin/svtree-init | 8 | ||||
| -rwxr-xr-x | bin/svtree-run | 9 | ||||
| -rw-r--r-- | dirs.conf | 7 | ||||
| -rwxr-xr-x | openrc.service | 2 |
4 files changed, 10 insertions, 16 deletions
diff --git a/bin/svtree-init b/bin/svtree-init deleted file mode 100755 index 74e6bf9..0000000 --- a/bin/svtree-init +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/execlineb -P - -importas -iS HOME -importas -iS XDG_RUNTIME_DIR - -envfile -I /opt/svtree/dirs.conf - -exec s6-rc-recompile diff --git a/bin/svtree-run b/bin/svtree-run index 72f47b0..eab97f5 100755 --- a/bin/svtree-run +++ b/bin/svtree-run @@ -1,11 +1,14 @@ #!/bin/execlineb -P -importas -iS HOME -importas -iS XDG_RUNTIME_DIR +importas -iS -D "/etc" XDG_CONFIG_HOME +importas -iS -D "/run" XDG_RUNTIME_DIR envfile -I /opt/svtree/dirs.conf -# compiled (setup by init script) +# compile s6-rc db +foreground { s6-rc-recompile } + +# check that we have the db if { eltest -e ${COMPILED_DIR} } # TODO: cgroup support diff --git a/dirs.conf b/dirs.conf index 8f5894d..b7eb11a 100644 --- a/dirs.conf +++ b/dirs.conf @@ -1,6 +1,5 @@ -STATE_DIR=/etc/s6-rc" # "${XDG_CONFIG_HOME}/s6-rc" -LIVE_DIR=/run/s6-rc # "${XDG_RUNTIME_DIR}/s6-rc" -SCAN_DIR=/run/service # "${XDG_RUNTIME_DIR}/service" - +STATE_DIR="${XDG_CONFIG_HOME}/s6-rc" +LIVE_DIR="${XDG_RUNTIME_DIR}/s6-rc" +SCAN_DIR="${XDG_RUNTIME_DIR}/service" SOURCE_DIR="${STATEDIR}/src" COMPILED_DIR="${STATEDIR}/compiled" diff --git a/openrc.service b/openrc.service index ea822ae..1d2df11 100755 --- a/openrc.service +++ b/openrc.service @@ -15,7 +15,7 @@ depend() { } start_pre() { - /opt/svtree/bin/svtree-init + true } reload() { |