From b2b17ba5da1ccebe955ee4f4fb2f95d03e38670d Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Tue, 21 May 2024 23:27:14 -0300 Subject: [PATCH] Update isportzap-member --- libexec/portzap/isportzap-member | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/libexec/portzap/isportzap-member b/libexec/portzap/isportzap-member index 3517c46..593e357 100644 --- a/libexec/portzap/isportzap-member +++ b/libexec/portzap/isportzap-member @@ -1,12 +1,9 @@ #!/bin/sh set -e +## +# main group="_portzap" -if id -Gn | \ - tr ' ' '\n' | \ - grep -e "^${group}$" \ - > /dev/null 2>&1; then - exit 0 -else - exit 1 -fi +mygroups=$(id -Gn | tr ' ' '\n') +echo "${mygroups}" | grep -e "^${group}$" > /dev/null 2>&1 +exit "${?}"