File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -87,12 +87,17 @@ ss_apt_upgrade
8787# # https://github.com/fail2ban/fail2ban/issues/3755
8888# # https://support.plesk.com/hc/en-us/articles/23560932208535-Fail2ban-does-not-start-on-a-Plesk-server-with-Ubuntu-24-No-module-named-asynchat
8989
90- # # install asynchat compatibility package only if missing on ubuntu 24.04 ##
90+ # # check if ubuntu 24.04 needs the asynchat compatibility workaround ##
9191if [[ " ${SYSTEM_UBUNTU_VERSION} " == " 24.04" ]]; then
92- if ! python3 -c " import asynchat" > /dev/null 2>&1 ; then
92+
93+ PYTHON_ASYNCHAT_STATUS=$( python3 -c " import asynchat" > /dev/null 2>&1 ; echo " $? " )
94+
95+ # # install asynchat compatibility package only if missing ##
96+ if [[ " ${PYTHON_ASYNCHAT_STATUS} " != " 0" ]]; then
9397 ss_apt_install python3-pip
9498 python3 -m pip install pyasynchat --break-system-packages
9599 fi
100+
96101fi
97102
98103ss_apt_install fail2ban
You can’t perform that action at this time.
0 commit comments