From 995f7f37e358781d5496e4ee01e473401e7273c0 Mon Sep 17 00:00:00 2001 From: librelad Date: Tue, 26 May 2026 22:33:09 +0100 Subject: [PATCH] style(uninstall): restructure the destructive-prompt summary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The wall-of-dashes "✗ Error This PERMANENTLY removes EVERYTHING" listing made the most consequential prompt in the project look like a routine error log: same icon as a failed command, unaligned columns, no visual grouping. Replaced with a structured block: - Single red ⚠ "PERMANENT — there is no undo" callout (instead of the ✗ "Error" prefix, which semantically means a thing failed — this is a pre-action warning). - Four bold section headings (Filesystem / Users / System integration / Containers + binaries) so the reader can scan by category. - Aligned %-34s path column with dim trailing descriptors — the eye can sweep the left edge without re-anchoring per line. - Green "Left in place:" reassurance lands at the end (same content as before, just promoted from two isNotice lines into one styled line). Pure-presentation change — no behavioural difference, same destroy list, same DELETE LIBREPORTAL prompt. Verified the printf format renders cleanly with the colour vars from variables.sh. Co-Authored-By: Claude Opus 4.7 Signed-off-by: librelad --- init.sh | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/init.sh b/init.sh index 729965c..0c630bd 100755 --- a/init.sh +++ b/init.sh @@ -1634,18 +1634,30 @@ runFullUninstall() local keep_docker="${init_skip_docker_images:-false}" isHeader "LibrePortal — FULL Uninstall" - isError "This PERMANENTLY removes EVERYTHING — there is no undo:" - echo " - all containers + images + the rootless docker setup" - echo " - $docker_dir (system: configs, database, install)" - echo " - $containers_dir (live app data)" - echo " - $backup_dir (backup repos)" - echo " - the '$mgr' and '$iuser' users + their home directories" - echo " - /usr/local/lib/libreportal/ + the /usr/local/bin/libreportal command" - echo " - /etc/sudoers.d/$mgr, the systemd service, the sysctl drop-ins" - echo " - the restic / kopia / ufw-docker binaries LibrePortal installed" echo "" - isNotice "LEFT IN PLACE: the docker engine, docker-compose, apt-installed deps," - isNotice "and your SSH config (so you can't get locked out)." + printf " ${RED}${BOLD}⚠ PERMANENT — there is no undo.${NC} Everything below is wiped:\n" + echo "" + printf " ${BOLD}Filesystem${NC}\n" + printf " %-34s ${DIM}%s${NC}\n" "$docker_dir" "system root — configs, database, install tree" + printf " %-34s ${DIM}%s${NC}\n" "$containers_dir" "live app data" + printf " %-34s ${DIM}%s${NC}\n" "$backup_dir" "backup repos" + echo "" + printf " ${BOLD}Users${NC}\n" + printf " %-34s ${DIM}%s${NC}\n" "$mgr" "manager — /home/$mgr + scoped sudoers + cron spool" + printf " %-34s ${DIM}%s${NC}\n" "$iuser" "rootless docker user — /home/$iuser + image cache" + echo "" + printf " ${BOLD}System integration${NC}\n" + printf " %-34s ${DIM}%s${NC}\n" "/usr/local/lib/libreportal/" "root-owned helpers + signing key" + printf " %-34s ${DIM}%s${NC}\n" "/usr/local/bin/libreportal" "CLI wrapper" + printf " %-34s ${DIM}%s${NC}\n" "/etc/sudoers.d/$mgr" "scoped sudo grant" + printf " %-34s ${DIM}%s${NC}\n" "libreportal.service" "systemd task processor" + printf " %-34s ${DIM}%s${NC}\n" "/etc/sysctl.d/99-libreportal*" "rootless sysctl drop-ins" + echo "" + printf " ${BOLD}Containers + binaries${NC}\n" + printf " ${DIM}%s${NC}\n" "all containers + images + the rootless docker daemon" + printf " ${DIM}%s${NC}\n" "restic, kopia, ufw-docker (only the ones LibrePortal installed)" + echo "" + printf " ${GREEN}Left in place:${NC} ${DIM}docker engine, docker-compose, apt-installed deps, and your SSH config (so you can't get locked out).${NC}\n" echo "" if [[ "$keep_docker" == "true" ]]; then isNotice "--skip-docker-images: KEEPING the rootless docker daemon, the '$iuser' user, and the image/build cache (for a faster reinstall)."