[root@localhost ~]# /bin/bash -x /www/server/panel/plugin/fail2ban/install.sh install > /tmp/fail2baninstall.log
+ PATH=/www/server/panel/pyenv/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/root/bin
+ export PATH
+ py_v=/usr/bin/python
+ pip_v=pip
+ '[' -d /www/server/panel/pyenv ']'
+ py_v=/www/server/panel/pyenv/bin/python
+ pip_v=/www/server/panel/pyenv/bin/php
+ mkdir /var/run/fail2ban
mkdir: cannot create directory ‘/var/run/fail2ban’: File exists
+ plugin_path=/www/server/panel/plugin/fail2ban
+ /www/server/panel/pyenv/bin/php unintall setuptools -y
/www/server/panel/plugin/fail2ban/install.sh: line 14: /www/server/panel/pyenv/bin/php: No such file or directory
+ /www/server/panel/pyenv/bin/php install setuptools==57.5.0
/www/server/panel/plugin/fail2ban/install.sh: line 15: /www/server/panel/pyenv/bin/php: No such file or directory
+ action=install
+ '[' install == install ']'
+ Install_fail2ban
+ mkdir -p /www/server/panel/plugin/fail2ban/cdn
+ cd /tmp
+ '[' -f /usr/bin/yum ']'
+ yum install git -y
+ yum install rsyslog -y
+ new_install
+ cp /www/server/panel/plugin/fail2ban/fail2ban.tar.gz /tmp/fail2ban.tar.gz
+ cd /tmp
+ tar -zxf fail2ban.tar.gz
+ cp /tmp/fail2ban/files/debian-initd /etc/init.d/fail2ban
+ cd /tmp/fail2ban
+ /www/server/panel/pyenv/bin/python setup.py install
/www/server/panel/pyenv/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
File "/www/server/panel/pyenv/lib/python3.7/site-packages/fail2ban/server/ipdns.py", line 312
mask = ~(0xFFFFFFFFL >> cidr)
^
SyntaxError: invalid syntax
File "/www/server/panel/pyenv/lib/python3.7/site-packages/fail2ban/tests/filtertestcase.py", line 1596
% m for m in 53, 54, 57, 58])
^
SyntaxError: invalid syntax
File "/www/server/panel/pyenv/lib/python3.7/site-packages/fail2ban/tests/misctestcase.py", line 264
print deep_function(3)
^
SyntaxError: invalid syntax
/www/server/panel/pyenv/lib/python3.7/site-packages/setuptools/command/egg_info.py:637: SetuptoolsDeprecationWarning: Custom 'build_py' does not implement 'get_data_files_without_manifest'.
Please extend command classes from setuptools instead of distutils.
SetuptoolsDeprecationWarning
+ rm -rf /tmp/fail2ban
+ rm -f /usr/bin/fail2ban-client
+ rm -f /usr/bin/fail2ban-server
+ '[' /www/server/panel/pyenv/bin/python '!=' /usr/bin/python ']'
+ ln -s /www/server/panel/pyenv/bin/fail2ban-server /usr/bin/fail2ban-server
+ ln -s /www/server/panel/pyenv/bin/fail2ban-client /usr/bin/fail2ban-client
+ '[' '!' -f /usr/bin/fail2ban-client ']'
+ sed -i 's/pidfile\s=.*/pidfile = \/www\/server\/panel\/plugin\/fail2ban\/fail2ban\.pid/g' /etc/fail2ban/fail2ban.conf
+ sed -i 's/socket\s=\s\/.*/socket = \/www\/server\/panel\/plugin\/fail2ban\/fail2ban\.sock/g' /etc/fail2ban/fail2ban.conf
+ '[' '!' -f /etc/fail2ban/jail.local ']'
++ grep -v '#' /etc/ssh/sshd_config
++ grep Port
++ awk '{print $2}'
++ tr '\n' ,
+ sshport=
+ sshport=
+ '[' '' = '' ']'
+ sshport=22
+ sed -i 's/port = 22/port = 22/g' /etc/fail2ban/jail.local
+ ftpport=21
+ '[' -f /www/server/pure-ftpd/etc/pure-ftpd.conf ']'
++ grep -v '#' /www/server/pure-ftpd/etc/pure-ftpd.conf
++ grep Bind
++ awk -F , '{print $2}'
+ ftpport=
+ '[' '' = '' ']'
+ ftpport=21
+ sed -i 's/port = 21/port = 21/g' /etc/fail2ban/jail.local
+ jsonconf='{"sshd": {"maxretry": 5, "findtime": 300, "act": "true", "port": "22", "dir": "", "bantime": 86400},"ftpd": {"maxretry": 5, "findtime": 300, "act": "true", "port": 21, "dir": "", "bantime": 86400}}'
+ '[' '!' -f /www/server/panel/plugin/fail2ban/config.json ']'
+ '[' -f /var/log/auth.log ']'
+ '[' '!' -f /etc/redhat-release ']'
+ grep -v '#' /etc/rsyslog.conf
+ grep messages
+ '[' 0 -ne 0 ']'
+ '[' '!' -f /var/log/messages ']'
+ systemctl restart rsyslog
+ systemctl unmask fail2ban
+ systemctl daemon-reload
+ systemctl restart fail2ban
+ systemctl enable fail2ban
+ echo Successify
+ echo 1
[root@localhost ~]# |