mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-08-28 05:27:41 +00:00
Implement the web-first install experience across the server, CLI, API spec, web app, and packaged SPA assets. This also removes test-side process env mutation by pushing env-dependent decision points behind explicit helpers and test wiring.
13 lines
354 B
Bash
Executable file
13 lines
354 B
Bash
Executable file
#!/bin/sh
|
|
set -eu
|
|
|
|
# When started as root (the default), ensure the storage volume is writable
|
|
# by the unprivileged fabro user, then drop privileges.
|
|
if [ "$(id -u)" = 0 ]; then
|
|
mkdir -p "${FABRO_HOME:-/storage/.home}"
|
|
chown fabro:fabro /storage
|
|
chown -R fabro:fabro "${FABRO_HOME:-/storage/.home}"
|
|
exec su-exec fabro "$@"
|
|
fi
|
|
|
|
exec "$@"
|