summaryrefslogtreecommitdiffstats
path: root/login.sh
diff options
context:
space:
mode:
Diffstat (limited to 'login.sh')
-rw-r--r--login.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/login.sh b/login.sh
index 00d1206..0c1b26a 100644
--- a/login.sh
+++ b/login.sh
@@ -79,7 +79,11 @@ if [ "$(cat /proc/self/cgroup 2>/dev/null)" = "0::/" ] && [ -w /sys/fs/cgroup ];
chown -R dev:dev /sys/fs/cgroup 2>/dev/null || true
fi
-su dev
+# Everything above needed root; from here on this is the dev user. exec so that
+# the shell replaces the entrypoint instead of being a child of it: as it was,
+# `su dev` ran a shell whose exit dropped you into a root one, and the container
+# only stopped when that second shell exited too.
+exec runuser -u dev -- /bin/bash
# if [[ -z "${PASEO_PASSWORD:-}" ]]; then
# echo "PASEO_PASSWORD is required" >&2
@@ -87,5 +91,4 @@ su dev
# fi
# echo "[devbox] starting Paseo daemon on ${PASEO_LISTEN} (web UI: ${PASEO_WEB_UI_ENABLED})"
-# exec paseo daemon run
-exec /bin/bash
+# exec runuser -u dev -- paseo daemon run