This commit is contained in:
parent
29ef3e0303
commit
98b91c4d5e
2 changed files with 4 additions and 5 deletions
|
@ -15,9 +15,9 @@ user=_portzap
|
||||||
##
|
##
|
||||||
# main
|
# main
|
||||||
if [ "$(id -u)" = "0" ]; then
|
if [ "$(id -u)" = "0" ]; then
|
||||||
pw userdel -n "${user}" || true
|
pw userdel -n "${user}" || true
|
||||||
pw groupdel -n "${user}" || true
|
pw groupdel -n "${user}" || true
|
||||||
rm -rf /home/"${user}"/ || true
|
rm -rf /home/"${user:?}"/ || true
|
||||||
printok "done"
|
printok "done"
|
||||||
else
|
else
|
||||||
printerr "you must be root"
|
printerr "you must be root"
|
||||||
|
|
|
@ -16,8 +16,7 @@ sharedir="${localbase}"/share/portzap
|
||||||
# main
|
# main
|
||||||
src="${sharedir}"/doas.conf
|
src="${sharedir}"/doas.conf
|
||||||
dest="${localbase}"/etc/doas.conf
|
dest="${localbase}"/etc/doas.conf
|
||||||
cat "${src}" |
|
while read -r line < "${src}"; do
|
||||||
while read -r line; do
|
|
||||||
if grep -q "${line}" "${dest}"; then
|
if grep -q "${line}" "${dest}"; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue