dev-env-start.sh 456 B

123456789101112
  1. #!/bin/bash
  2. # This script is meant to be run as root when the git bridge starts up in
  3. # the dev environment. It ensures that the data directory is created and
  4. # owned by the "node" user, which is the regular user git bridge runs as.
  5. ROOT_DIR="${GIT_BRIDGE_ROOT_DIR:-/tmp/wlgb}"
  6. mkdir -p "$ROOT_DIR"
  7. chown node:node "$ROOT_DIR"
  8. # Drop privileges using setpriv to avoid spawning a new process
  9. exec setpriv --reuid=node --regid=node --init-groups make run