wo4hOdZddlZddlmZddlZddlmZejeZ edZ edZ dZ dZ ejd e e fd Zd d ZdS) at Remove /var/cpanel/templates/apache2_4/ea4_main.local file introduced by imunify360. This file was used to change apache log format (%h->%a), when imunify360 installed remote_ip apache module. Since this file is created once it can be outdated after updating cPanel ( in case if /var/cpanel/templates/apache2_4/ea4_main.default also updated). See DEF-9641 for details. N)Path)antivirus_modez./var/cpanel/templates/apache2_4/ea4_main.localz0/var/cpanel/templates/apache2_4/ea4_main.defaultz%a z%h Fc |rdSddlm} |r|r}|}|t t}||kr3|tj |j dSdSdSdS#t$r'} td|| Yd} ~ dSd} ~ wwxYw)Nr)cPanelzCan't remove %s, reason: %s)im360.subsys.panels.cpanelr is_installedexists read_textreplaceNEWOLDunlink subprocess check_callREBUILD_HTTPDCONF_CMD Exceptionloggererror) migratordatabasefakedefault_conf_pathlocal_conf_pathkwargsr origin_text restored_textexcs n/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/161_remove_ea4_main_local_conf.pymigraters) 111111 J     D_%;%;%=%= D+5577K+5577??SIIM ++&&(((%f&BCCCCC D D D D,+ JJJ 2OSIIIIIIIIIJsB!B55 C&?C!!C&c dS)N)rrrrs rrollbackr"7sD)F)__doc__loggingpathlibrrdefence360agent.utilsr getLogger__name__rEA4_MAIN_LOCAL_PATHEA4_MAIN_DEFAULT_PATHr r skiprr"r!r#rr-s  000000  8 $ $dKLL6   +' JJJJ4      r#