automatically set getroot and firewall command by OS
This commit is contained in:
parent
19ddf883ee
commit
9721f91465
@ -3,16 +3,15 @@
|
|||||||
# API reference: https://www.stopforumspam.com/usage
|
# API reference: https://www.stopforumspam.com/usage
|
||||||
|
|
||||||
# user configuration area - change as needed
|
# user configuration area - change as needed
|
||||||
ostype="bsd" # allowed options are bsd, linux
|
|
||||||
logf=/var/log/forumspam.log
|
logf=/var/log/forumspam.log
|
||||||
limit=0 # number of violations allowed before blocking the ip
|
limit=0 # number of violations allowed before blocking the ip
|
||||||
|
|
||||||
case "$ostype" in
|
case `uname` in
|
||||||
bsd)
|
(*"BSD"*)
|
||||||
getroot="doas"
|
getroot="doas"
|
||||||
fw_cmd="pfctl"
|
fw_cmd="pfctl"
|
||||||
;;
|
;;
|
||||||
linux)
|
(*)
|
||||||
getroot="sudo"
|
getroot="sudo"
|
||||||
fw_cmd="ufw"
|
fw_cmd="ufw"
|
||||||
;;
|
;;
|
||||||
|
Reference in New Issue
Block a user