SLBR/deathwatch.sh

7 lines
156 B
Bash
Executable File

#!/bin/sh
inotifywait -mrqe delete users | while read dir
do
echo "$dir" | grep -q 'ISDIR .ssh' \
&& ./deluser.sh "$(echo $dir | cut -f 2 -d '/')"
done