added broadcast of users death, modified killme.sh

This commit is contained in:
sose 2019-03-26 20:24:17 +01:00
parent a414c17ac0
commit cd366d7fb8
2 changed files with 4 additions and 2 deletions

View File

@ -5,6 +5,8 @@
inotifywait -mre delete users | while read -r dir
do
user="$(echo "$dir" | cut -f 2 -d '/')"
echo "$dir" | grep -q 'ISDIR .ssh' \
&& ./deluser.sh "$(echo "$dir" | cut -f 2 -d '/')"
&& ./deluser.sh "$(echo "$dir" | cut -f 2 -d '/')" \
&& ./sendmsg.sh "$user has been eliminated!"
done

View File

@ -8,7 +8,7 @@ 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"
echo "user $SLBRUSER not found in users.txt, will not delete"
exit
fi