diff --git a/scripts/system/libreportal-relocate b/scripts/system/libreportal-relocate index dadce92..f18769d 100755 --- a/scripts/system/libreportal-relocate +++ b/scripts/system/libreportal-relocate @@ -235,6 +235,23 @@ if [[ -f "$COMPOSE" ]]; then ok "WebUI compose bind-mounts" fi +# ---- 4b. the manager's crontab ------------------------------------------------ +# The @reboot boot-reconcile entry embeds an absolute path under the SYSTEM dir +# ("${install_scripts_dir}crontab/system/crontab_boot_app_reconcile.sh"). Move +# that root and the path stops existing — and the entry is redirected to +# /dev/null, so nothing reports it. The only symptom is that apps quietly do not +# come back after a reboot, which is easy to blame on anything else. +if crontab -u "$MANAGER" -l >/dev/null 2>&1; then + crontab -u "$MANAGER" -l > "$BACKUP_DIR/crontab.$MANAGER" 2>/dev/null + if sed -e "s#${CUR_SYSTEM}#${FIN_SYSTEM}#g" \ + -e "s#${CUR_CONTAINERS}#${FIN_CONTAINERS}#g" \ + "$BACKUP_DIR/crontab.$MANAGER" | crontab -u "$MANAGER" - 2>/dev/null; then + ok "manager crontab" + else + warn "could not rewrite ${MANAGER}'s crontab — check 'crontab -l -u $MANAGER'" + fi +fi + # ---- 5. ownership on the new trees ------------------------------------------- say "Reconciling ownership" "$LIB_DIR/libreportal-ownership" reconcile >/dev/null 2>&1 && ok "ownership reconciled" \