mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-03-31 13:35:08 -05:00
17 lines
397 B
Bash
Executable File
17 lines
397 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
SUPERVISORD_WORKING_DIR="${PAPERLESS_SUPERVISORD_WORKING_DIR:-$PWD}"
|
|
rootless_args=()
|
|
if [ "$(id -u)" == "$(id -u paperless)" ]; then
|
|
rootless_args=(
|
|
--user
|
|
paperless
|
|
--logfile
|
|
"${SUPERVISORD_WORKING_DIR}/supervisord.log"
|
|
--pidfile
|
|
"${SUPERVISORD_WORKING_DIR}/supervisord.pid"
|
|
)
|
|
fi
|
|
|
|
exec /usr/local/bin/supervisord -c /etc/supervisord.conf "${rootless_args[@]}"
|