Fix shellcheck errors
Some checks are pending
portzap / shellcheck (push) Waiting to run

This commit is contained in:
0x1eef 2024-08-17 18:50:02 -03:00
parent 29ef3e0303
commit 98b91c4d5e
2 changed files with 4 additions and 5 deletions

View file

@ -15,9 +15,9 @@ user=_portzap
##
# main
if [ "$(id -u)" = "0" ]; then
pw userdel -n "${user}" || true
pw groupdel -n "${user}" || true
rm -rf /home/"${user}"/ || true
pw userdel -n "${user}" || true
pw groupdel -n "${user}" || true
rm -rf /home/"${user:?}"/ || true
printok "done"
else
printerr "you must be root"

View file

@ -16,8 +16,7 @@ sharedir="${localbase}"/share/portzap
# main
src="${sharedir}"/doas.conf
dest="${localbase}"/etc/doas.conf
cat "${src}" |
while read -r line; do
while read -r line < "${src}"; do
if grep -q "${line}" "${dest}"; then
continue
fi