feat(deploy): deployer self-reloads its own script from git each poll

This commit is contained in:
Pepe44DEV
2026-09-06 23:38:03 +00:00
parent ca0fea297b
commit 1107bc83b3
+7
View File
@@ -185,6 +185,13 @@ log "Fleet Forge deployer started (poll every ${POLL_INTERVAL}s, branch $GIT_BRA
mkdir -p "$SRC" "$CERT_DIR" "/cfg"
while true; do
if [ -f "$SRC/infrastructure/deploy/deploy.sh" ] && ! cmp -s "$0" "$SRC/infrastructure/deploy/deploy.sh"; then
log "self-updating deploy script from repo"
cp "$SRC/infrastructure/deploy/deploy.sh" "$0"
chmod +x "$0"
exec "$0"
fi
if ! HEAD=$(clone_or_pull 2>>/dev/stderr); then
log "git update failed, retrying in ${POLL_INTERVAL}s"
sleep "$POLL_INTERVAL"