diff --git a/forumspam.sh b/forumspam.sh index 3982f26..1af9132 100755 --- a/forumspam.sh +++ b/forumspam.sh @@ -3,16 +3,15 @@ # API reference: https://www.stopforumspam.com/usage # user configuration area - change as needed -ostype="bsd" # allowed options are bsd, linux logf=/var/log/forumspam.log limit=0 # number of violations allowed before blocking the ip -case "$ostype" in - bsd) +case `uname` in + (*"BSD"*) getroot="doas" fw_cmd="pfctl" ;; - linux) + (*) getroot="sudo" fw_cmd="ufw" ;;