mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 09:09:36 +02:00
[git-bridge] Make git-bridge data persistent GitOrigin-RevId: e5e7ec613db455b21b4f96c9bf8e6829cc02a4ce
13 lines
456 B
Bash
Executable File
13 lines
456 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script is meant to be run as root when the git bridge starts up in
|
|
# the dev environment. It ensures that the data directory is created and
|
|
# owned by the "node" user, which is the regular user git bridge runs as.
|
|
|
|
ROOT_DIR="${GIT_BRIDGE_ROOT_DIR:-/tmp/wlgb}"
|
|
mkdir -p "$ROOT_DIR"
|
|
chown node:node "$ROOT_DIR"
|
|
|
|
# Drop privileges using setpriv to avoid spawning a new process
|
|
exec setpriv --reuid=node --regid=node --init-groups make run
|