mirror of
https://github.com/myronblair/do-server-config
synced 2026-06-30 17:50:59 -05:00
18 lines
572 B
Bash
Executable File
18 lines
572 B
Bash
Executable File
#!/usr/bin/env bash
|
|
PAT="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"
|
|
REPO_URL="https://${PAT}@github.com/myronblair/do-server-config.git"
|
|
REPO_DIR="/opt/do-server-config"
|
|
|
|
if [[ -d "$REPO_DIR/.git" ]]; then
|
|
cd "$REPO_DIR"
|
|
git config user.email "backup@orbishosting.com"
|
|
git config user.name "DO Server Backup"
|
|
git pull --rebase origin main -q 2>/dev/null || true
|
|
else
|
|
git clone "$REPO_URL" "$REPO_DIR"
|
|
cd "$REPO_DIR"
|
|
git config user.email "backup@orbishosting.com"
|
|
git config user.name "DO Server Backup"
|
|
fi
|
|
exec bash "$REPO_DIR/backup.sh"
|