From c69cdd82838cd35ba9faaec193f47388f8c26683 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sun, 18 Aug 2024 20:03:55 -0300 Subject: [PATCH] Update portzap-{setup,teardown} --- libexec/portzap/commands/portzap-setup | 1 + libexec/portzap/commands/portzap-teardown | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libexec/portzap/commands/portzap-setup b/libexec/portzap/commands/portzap-setup index 52a7e85..4ece63d 100755 --- a/libexec/portzap/commands/portzap-setup +++ b/libexec/portzap/commands/portzap-setup @@ -16,6 +16,7 @@ libexec="${localbase}"/libexec/portzap if [ "$(id -u)" = "0" ]; then "${libexec}"/setup/setup-user "${libexec}"/setup/setup-doas + printok "setup complete" else printerr "you must be root" exit 1 diff --git a/libexec/portzap/commands/portzap-teardown b/libexec/portzap/commands/portzap-teardown index dcab12b..ca6af0a 100755 --- a/libexec/portzap/commands/portzap-teardown +++ b/libexec/portzap/commands/portzap-teardown @@ -15,10 +15,10 @@ user=_portzap ## # main if [ "$(id -u)" = "0" ]; then - pw userdel -n "${user}" || true - pw groupdel -n "${user}" || true - rm -rf /home/"${user:?}"/ || true - printok "done" + pw userdel -n "${user}" > /dev/null 2>&1 || true + pw groupdel -n "${user}" > /dev/null 2>&1 || true + rm -rf /home/"${user:?}"/ > /dev/null 2>&1 || true + printok "teardown complete" else printerr "you must be root" exit 1