Skip to content

Commit

Permalink
Use /command/with-contenv instead
Browse files Browse the repository at this point in the history
  • Loading branch information
xZero707 committed May 15, 2024
1 parent 3f2de81 commit 90cb9b7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/unitd-configure/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bash
#!/command/with-contenv bash
# shellcheck shell=bash

# unitd-configure main
Expand Down
6 changes: 5 additions & 1 deletion rootfs/etc/s6-overlay/s6-rc.d/unitd/run
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/with-contenv bash
#!/command/with-contenv bash
# shellcheck shell=bash

# unitd main
Expand All @@ -7,13 +7,17 @@ main() {
exec > >(while read line; do echo "[unitd] ${line}"; done) 2>&1

local unitSocket="${UNIT_SOCKET:?}"

echo "> Start"

# This is for legacy support for versions prior to 1.30.0
if [ -d "/opt/unit" ] && [ -x "/opt/unit/sbin/unitd" ]; then
echo "> Legacy"
/opt/unit/sbin/unitd --no-daemon --tmp "/tmp" --state "/var/lib/unit/state" --modules "/opt/unit/modules" --control "unix:${unitSocket}"
return
fi

echo "> Current"
/usr/local/sbin/unitd --no-daemon --control "unix:${unitSocket}"
}

Expand Down

0 comments on commit 90cb9b7

Please sign in to comment.