Update 2023-10-23 15:31 OpenBSD/amd64-dalek
This commit is contained in:
parent
6b75137276
commit
b80c9573e5
@ -3,8 +3,8 @@
|
||||
LIST="$(doas sysclean -a)"
|
||||
|
||||
FILES="$(echo "$LIST" | grep -v ^@)"
|
||||
USERS="$(echo "$LIST" | grep ^@user)"
|
||||
GROUPS="$(echo "$LIST" | grep ^@group)"
|
||||
USERS="$(echo "$LIST" | grep ^@user | cut -d" " -f2 | cut -d":" -f1)"
|
||||
GROUPS="$(echo "$LIST" | grep ^@group | cut -d" " -f2 | cut -d":" -f1)"
|
||||
|
||||
if [ ! -z "$FILES" ]
|
||||
then
|
||||
@ -15,3 +15,23 @@ then
|
||||
[yY]) echo "$FILES" | xargs doas rm -rf; ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ ! -z "$USERS" ]
|
||||
then
|
||||
echo "$USERS"
|
||||
echo -n "Delete these users? [y/N] "
|
||||
read
|
||||
case $REPLY in
|
||||
[yY]) echo "$USERS" | xargs -n1 doas userdel; ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
if [ ! -z "$GROUPS" ]
|
||||
then
|
||||
echo "$GROUPS"
|
||||
echo -n "Delete these groups? [y/N] "
|
||||
read
|
||||
case $REPLY in
|
||||
[yY]) echo "$GROUPS" | xargs -n1 doas groupdel; ;;
|
||||
esac
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user