2026-10-15 23:08:47 -06:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
# Container entrypoint. tini runs this as PID 1's child.
|
2026-10-16 14:45:38 -06:00
|
|
|
# Usage: app | worker | job run <name> | fixtures use <N> [--dir DIR] | migrate [--bootstrap-roles] | doctor
|
|
|
|
|
# | version | healthcheck app|worker
|
2026-10-15 23:08:47 -06:00
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
# MFilesKit reads its password from the environment only, so export it from the secret file.
|
|
|
|
|
# VisualKit, ldap3 and the database settings read their *_FILE paths directly.
|
|
|
|
|
mfiles_secret=/run/secrets/mfileskit_password
|
|
|
|
|
if [[ -r "$mfiles_secret" ]]; then
|
|
|
|
|
MFILES_PASSWORD="$(<"$mfiles_secret")"
|
|
|
|
|
# Drop a trailing carriage return left by an editor on Windows.
|
|
|
|
|
MFILES_PASSWORD="${MFILES_PASSWORD%$'\r'}"
|
|
|
|
|
export MFILES_PASSWORD
|
|
|
|
|
fi
|
|
|
|
|
unset mfiles_secret
|
|
|
|
|
|
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
|
|
|
set -- app
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
exec packetstation "$@"
|