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
|
||||
|
||||
# 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"
|
||||
;;
|
||||
|
Reference in New Issue
Block a user