Special case for creating a super user to make it a little cleaner

This commit is contained in:
Trenton H
2025-03-26 13:19:19 -07:00
parent b0723c13a3
commit c0d81430d9
10 changed files with 26 additions and 11 deletions

View File

@@ -0,0 +1,14 @@
#!/command/with-contenv /usr/bin/bash
# shellcheck shell=bash
set -e
cd "${PAPERLESS_SRC_DIR}"
if [[ $(id -u) == 0 ]]; then
s6-setuidgid paperless python3 manage.py createsuperuser "$@"
elif [[ $(id -un) == "paperless" ]]; then
python3 manage.py createsuperuser "$@"
else
echo "Unknown user."
fi