improve config loading of TMP_DIR, LIB_DIR, move to separate files

This commit is contained in:
Nick Sweeting 2024-10-07 23:45:11 -07:00
parent 7a895d9285
commit cf1ea8f80f
No known key found for this signature in database
49 changed files with 767 additions and 527 deletions

View file

@ -110,12 +110,11 @@ if [[ -d "$PLAYWRIGHT_BROWSERS_PATH/.links" ]]; then
chown -h $PUID:$PGID "$PLAYWRIGHT_BROWSERS_PATH"/.links/*
fi
# also chown tmp dir
mkdir -p /tmp/archivebox
chmod 777 /tmp
chown $PUID:$PGID /tmp/archivebox
mkdir -p /app/lib
chown $PUID:$PGID /app/lib /app/lib/*
# also chown tmp dir and lib dir
mkdir -p "$SYSTEM_TMP_DIR"
chown $PUID:$PGID "$SYSTEM_TMP_DIR"
mkdir -p "$SYSTEM_LIB_DIR"
chown $PUID:$PGID "$SYSTEM_LIB_DIR" "$SYSTEM_LIB_DIR"/*
# (this check is written in blood in 2023, QEMU silently breaks things in ways that are not obvious)
export IN_QEMU="$(pmap 1 | grep qemu >/dev/null && echo 'True' || echo 'False')"