3
This commit is contained in:
+10
-1
@@ -5,8 +5,17 @@ RUNTIME_LOG_DIR=""
|
||||
RUNTIME_LOG_FILE=""
|
||||
|
||||
runtime_init() {
|
||||
local uid_suffix=""
|
||||
|
||||
RUNTIME_PROJECT_ROOT="$1"
|
||||
RUNTIME_LOG_DIR="${TMPDIR:-/tmp}/postinstall-debian"
|
||||
|
||||
if [[ "${EUID:-$(id -u)}" -eq 0 ]]; then
|
||||
RUNTIME_LOG_DIR="${TMPDIR:-/tmp}/postinstall-debian"
|
||||
else
|
||||
uid_suffix="$(id -u)"
|
||||
RUNTIME_LOG_DIR="${TMPDIR:-/tmp}/postinstall-debian-$uid_suffix"
|
||||
fi
|
||||
|
||||
RUNTIME_LOG_FILE="$RUNTIME_LOG_DIR/install.log"
|
||||
mkdir -p "$RUNTIME_LOG_DIR"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user