paperless-ngx/docker/management_script.sh

15 lines
308 B
Bash
Raw Normal View History

#!/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 management_command "$@"
elif [[ $(id -un) == "paperless" ]]; then
2022-03-20 15:58:37 +01:00
python3 manage.py management_command "$@"
else
2022-03-20 15:58:37 +01:00
echo "Unknown user."
fi