style(uninstall): restructure the destructive-prompt summary
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 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
43710d0d6b
commit
995f7f37e3
34
init.sh
34
init.sh
@ -1634,18 +1634,30 @@ runFullUninstall()
|
|||||||
local keep_docker="${init_skip_docker_images:-false}"
|
local keep_docker="${init_skip_docker_images:-false}"
|
||||||
|
|
||||||
isHeader "LibrePortal — FULL Uninstall"
|
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 ""
|
echo ""
|
||||||
isNotice "LEFT IN PLACE: the docker engine, docker-compose, apt-installed deps,"
|
printf " ${RED}${BOLD}⚠ PERMANENT — there is no undo.${NC} Everything below is wiped:\n"
|
||||||
isNotice "and your SSH config (so you can't get locked out)."
|
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 ""
|
echo ""
|
||||||
if [[ "$keep_docker" == "true" ]]; then
|
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)."
|
isNotice "--skip-docker-images: KEEPING the rootless docker daemon, the '$iuser' user, and the image/build cache (for a faster reinstall)."
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user