logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

pleroma-host-release-entrypoint.sh (487B)


  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. uid="${PLEROMA_UID:-}"
  4. gid="${PLEROMA_GID:-}"
  5. if [[ -z "${uid}" || -z "${gid}" ]]; then
  6. uid="$(stat -c '%u' /opt/pleroma)"
  7. gid="$(stat -c '%g' /opt/pleroma)"
  8. fi
  9. export HOME="${HOME:-/opt/pleroma}"
  10. if [[ "${PLEROMA_RUN_MIGRATIONS:-1}" != "0" && "${1:-}" == "/opt/pleroma/bin/pleroma" && "${2:-}" == "start" ]]; then
  11. echo "Running migrations..."
  12. gosu "${uid}:${gid}" /opt/pleroma/bin/pleroma_ctl migrate
  13. fi
  14. exec gosu "${uid}:${gid}" "$@"