feat(entrypoint): Vault-Remote mit Sync-Token und Git-User konfigurieren
This commit is contained in:
1 parent
465f17f253
commit
ec6d9cf86e
1 file changed
+5
@@ -10,6 +10,11 @@ mkdir -p "$VAULT_DIR"
|
||||
if command -v git >/dev/null 2>&1; then
|
||||
git config --global --add safe.directory "$VAULT_DIR" 2>/dev/null || true
|
||||
if [ -d "$VAULT_DIR/.git" ]; then
|
||||
if [ -n "$VAULT_SYNC_TOKEN" ]; then
|
||||
git -C "$VAULT_DIR" remote set-url origin "https://${VAULT_SYNC_TOKEN}@git.orfel.de/Jannik/Mind-o-Mat-Vault.git" 2>/dev/null || true
|
||||
fi
|
||||
git -C "$VAULT_DIR" config user.name "Mind-o-Mat Server" 2>/dev/null || true
|
||||
git -C "$VAULT_DIR" config user.email "mindomat@orfel.de" 2>/dev/null || true
|
||||
echo "[Git] Pulling latest changes from remote..."
|
||||
(cd "$VAULT_DIR" && git pull --ff-only 2>/dev/null) || echo "[Git] Git pull skipped or offline"
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user