added broadcast of users death, modified killme.sh
This commit is contained in:
parent
a414c17ac0
commit
cd366d7fb8
|
@ -5,6 +5,8 @@
|
||||||
|
|
||||||
inotifywait -mre delete users | while read -r dir
|
inotifywait -mre delete users | while read -r dir
|
||||||
do
|
do
|
||||||
|
user="$(echo "$dir" | cut -f 2 -d '/')"
|
||||||
echo "$dir" | grep -q 'ISDIR .ssh' \
|
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
|
done
|
||||||
|
|
|
@ -8,7 +8,7 @@ SLBRUSER=$(whoami)
|
||||||
test -z "$SLBRUSER" && echo "no user provided" && exit
|
test -z "$SLBRUSER" && echo "no user provided" && exit
|
||||||
if ! (grep -qE "^$SLBRUSER$" /home/slbr/users.txt)
|
if ! (grep -qE "^$SLBRUSER$" /home/slbr/users.txt)
|
||||||
then
|
then
|
||||||
echo "user not found in users.txt, will not delete"
|
echo "user $SLBRUSER not found in users.txt, will not delete"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue