diff --git a/blockauth b/blockauth index 0999392..67bca5d 100755 --- a/blockauth +++ b/blockauth @@ -18,7 +18,7 @@ fi # Check dependencies path_check="/usr/bin /bin /usr/local/bin /sbin ${HOME}/.local/bin" -dependencies="iptables cat grep sort sed rm echo" +dependencies="iptables cat grep sort sed rm echo systemctl" dependencies_found="" dependencies_not_found="" for checkPath in ${path_check} ; do @@ -90,6 +90,7 @@ while [ ${blockauth} -eq 0 ] ; do echo "blockauth: allowing access for ${user}" >> ${filelog} sed -i "s/Failed password for ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log sed -i "s/Failed password for invalid user ${user} from/blockauth\[allowed\]\: invalid pass for ${user} from/g" /var/log/auth.log + systemctl restart rsyslog &> /dev/null done touch ${blocklist} cat ${blocklist} > ${blocklist}.temp