diff --git a/scripts/update_crontab.sh b/scripts/update_crontab.sh new file mode 100755 index 0000000..f79fb21 --- /dev/null +++ b/scripts/update_crontab.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# update_crontab.sh — post-migration crontab update for Marius. +# Replaces the clawd/tools/backup_config.sh line with the echo-core equivalent. +# Idempotent: safe to re-run. +set -euo pipefail +current=$(crontab -l 2>/dev/null || true) +new=$(printf '%s\n' "$current" | sed -E 's#/home/moltbot/clawd/tools/backup_config\.sh#/home/moltbot/echo-core/tools/backup_config.sh#g') +if [ "$current" != "$new" ]; then + printf '%s\n' "$new" | crontab - + echo "Crontab updated: backup_config.sh path remapped to echo-core." +else + echo "Crontab unchanged (already pointing at echo-core, or backup_config line absent)." +fi