diff --git a/deathwatch.sh b/deathwatch.sh index 426e0c2..0a721a0 100755 --- a/deathwatch.sh +++ b/deathwatch.sh @@ -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 diff --git a/killme.sh b/killme.sh index 5187060..93467de 100755 --- a/killme.sh +++ b/killme.sh @@ -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