Update 2024-02-14 07:51 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id
2024-02-14 07:54:31 +01:00
parent b55e6a3616
commit 9624895938
373 changed files with 19074 additions and 3045 deletions

37
.bin/OLD/sysclean-rm Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/sh
LIST="$(doas sysclean -a)"
FILES="$(echo "$LIST" | grep -v ^@)"
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
echo "$FILES"
echo -n "Delete these? [y/N] "
read
case $REPLY in
[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