automatically set getroot and firewall command by OS

This commit is contained in:
sceox 2021-12-27 15:36:45 -08:00
parent 19ddf883ee
commit 9721f91465

View File

@ -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"
;;