Update pve RustDesk GA sync scripts

This commit is contained in:
alexveley
2026-06-24 02:08:51 -04:00
parent 7151e11d34
commit f47915dadf
3 changed files with 68 additions and 94 deletions
+9 -10
View File
@@ -1,5 +1,5 @@
#!/bin/bash
# Install blair-sync-rustdesk-via-ga.sh from Gitea raw URL. Run on pve as root.
# Install or upgrade blair-sync-rustdesk-via-ga.sh from Gitea. Run on pve as root.
set -euo pipefail
BASE_URL="${BLAIR_SYNC_BASE_URL:-https://git.easygoingaming.com/Davoguha/blair-pve-sync-temp/raw/main}"
@@ -7,6 +7,7 @@ TARGET='/usr/local/sbin/blair-sync-rustdesk-via-ga.sh'
SHARE_COPY='/tank/blair-share/tools/golden/host/sync-rustdesk-via-guest-agent.sh'
CRON='/etc/cron.d/blair-rustdesk-sync'
LOG='/var/log/blair-rustdesk-sync.log'
CRON_LINE="*/2 * * * * root $TARGET >> $LOG 2>&1"
echo "=== Download sync script ==="
curl -fsSL "$BASE_URL/blair-sync-rustdesk-via-ga.sh" -o "$TARGET"
@@ -17,22 +18,20 @@ mkdir -p "$(dirname "$SHARE_COPY")"
cp -f "$TARGET" "$SHARE_COPY"
chmod +x "$SHARE_COPY"
echo "=== shebang check ==="
head -1 "$TARGET" | od -An -tx1
file "$TARGET"
echo "=== cron ==="
printf '%s\n' "*/5 * * * * root $TARGET >> $LOG 2>&1" > "$CRON"
echo "=== cron (every 2 min) ==="
printf '%s\n' "$CRON_LINE" > "$CRON"
chmod 644 "$CRON"
cat "$CRON"
echo "=== dry run ==="
echo "=== dry run (verbose) ==="
BLAIR_VERBOSE=1 "$TARGET" --dry-run
echo "=== live run ==="
"$TARGET"
echo "=== VM 230 description ==="
qm config 230 | grep ^description || true
echo "=== fleet descriptions ==="
for v in 230 231 232 233 234 235; do
qm config "$v" 2>/dev/null | grep ^description || true
done
echo "=== done ==="