forked from tildeverse/SLBR
15 lines
380 B
Bash
Executable File
15 lines
380 B
Bash
Executable File
#!/bin/sh
|
|
#This should only be run by users who have been eliminated
|
|
SLBRUSER=$(whoami)
|
|
test -z "$SLBRUSER" && echo "no user provided" && exit
|
|
if !(grep -qE "^$SLBRUSER$" /home/slbr/users.txt)
|
|
then
|
|
echo "user not found in users.txt, will not delete"
|
|
exit
|
|
fi
|
|
|
|
echo "removing /home/slbr/users/$SLBRUSER"
|
|
rm -rf "/home/slbr/users/$SLBRUSER/.ssh"
|
|
sleep 10
|
|
lxc delete -f "$SLBRUSER"
|