Send the webhook setup to the path the partner actually uses, and arm the sync gates before the seed that depends on them

This commit is contained in:
Gmer4Lfe
2026-08-16 20:32:14 -04:00
parent f363c6cd55
commit 7ed0f5c23b
2 changed files with 114 additions and 79 deletions
+13 -3
View File
@@ -253,10 +253,20 @@ if [[ "$LOCAL_ONLY" == false && -n "${REMOTE_ID:-}" ]]; then
remote_flags="--local-only"
[[ "$DRY_RUN" == true ]] && remote_flags="$remote_flags --dry-run"
ssh -i "$SSH_KEY" -o ConnectTimeout=10 -o StrictHostKeyChecking=no \
# The remote's own SCRIPTS_DIR, read from its varaverk.cfg — never the flash plugin path.
# That was hardcoded here, so a partner in appdata storage mode got
# "bash: .../Tools/webhook_setup.sh: No such file or directory" and the generic
# "check SSH and that Varaverk is installed" message, which pointed at two things that
# were both fine. HOST2 has run in appdata mode since it was installed.
SSH_TIMEOUT="${SSH_TIMEOUT:-10}"
remote_sd=$(resolve_remote_scripts_dir "$remote_ip" "$SSH_KEY" "no")
remote_script="${remote_sd}/Tools/webhook_setup.sh"
ssh -i "$SSH_KEY" -o ConnectTimeout=10 -o BatchMode=yes -o StrictHostKeyChecking=no \
root@"$remote_ip" \
"OVERRIDE_SECRET='$WEBHOOK_SECRET' bash /boot/config/plugins/varaverk/Tools/webhook_setup.sh $remote_flags" \
|| echo " Remote setup failed — check SSH and that Varaverk is installed on $REMOTE_SERVER_NAME"
"[ -f '$remote_script' ] || { echo missing; exit 127; }
OVERRIDE_SECRET='$WEBHOOK_SECRET' bash '$remote_script' $remote_flags" \
|| echo " Remote setup failed — no webhook_setup.sh at $remote_script on $REMOTE_SERVER_NAME, or SSH refused"
fi
echo ""