feat(uninstall): honor --unattended to skip the confirm prompt
runFullUninstall always prompted for `DELETE LIBREPORTAL`, so it couldn't be driven non-interactively. Honor the existing global --unattended flag (init_unattended_mode) to skip the prompt; an interactive `init.sh uninstall` still requires it. This lets the deploy helper do a clean teardown (`init.sh --unattended uninstall`) for a full reinstall instead of `rm -rf /docker`. The brute wipe left the task-processor systemd service running against a deleted runtime dir; init.sh's idempotent service setup then saw an unchanged unit and skipped the restart, so the reinstalled WebUI container was never started. The uninstall stops the service and tears down the rootless daemon + users in order, so the follow-up install behaves like a true first install. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
8712be2631
commit
e944a33d8f
14
init.sh
14
init.sh
@ -1319,11 +1319,15 @@ runFullUninstall()
|
||||
isNotice "LEFT IN PLACE: the docker engine, docker-compose, apt-installed deps,"
|
||||
isNotice "and your SSH config (so you can't get locked out)."
|
||||
echo ""
|
||||
isQuestion "Type exactly DELETE LIBREPORTAL to confirm:"
|
||||
local confirm; read -r confirm
|
||||
if [[ "$confirm" != "DELETE LIBREPORTAL" ]]; then
|
||||
isNotice "Aborted — nothing was removed."
|
||||
return 0
|
||||
if [[ "$init_unattended_mode" == true ]]; then
|
||||
isNotice "Unattended mode — proceeding without the DELETE LIBREPORTAL prompt."
|
||||
else
|
||||
isQuestion "Type exactly DELETE LIBREPORTAL to confirm:"
|
||||
local confirm; read -r confirm
|
||||
if [[ "$confirm" != "DELETE LIBREPORTAL" ]]; then
|
||||
isNotice "Aborted — nothing was removed."
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
isHeader "Tearing down LibrePortal"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user