g=ddlZddlZddlZddlmZddlmZddlmZm Z ddl m Z dZ dZ e e dd Ze e d d Zd ZdS) N)Feature)is_panel_feature_supported)runtask)install_packagez/usr/sbin/cagefsctlcFtjfd}|S)NcttjstjddSt jtstjddS|i|S)Nz.Feature 'CageFS' is not supported. Skipping...z$CageFS is not installed. Skipping...) rrCAGEFSloggingdebugospathexists CAGEFSCTL)argskwargsfuncs py/clconfigure/cagefs.py decoratorz'_skip_without_cagefs..decoratorsl)'.99  MJ K K K Fw~~i((  M@ A A A FtT$V$$$) functoolswraps)rrs` r_skip_without_cagefsrs9_T % % % % % rzCleaning CageFS environmentcttjrtjddSt t dg}|jdkr"tjd|j |j dSdS)Nz%LVE feature is supported. Skipping...z--clean-without-lve-environmentrzAUnable to clean non-LVE CageFS enviroment. stdout: %s, stderr: %s) rrLVEr r rrexitcodewarningstdoutstderr)results r$clean_cagefs_without_lve_environmentr!!s~"'+.. =>>> )>? @ @F ![ v} 6 6 6 6 6rzReconfiguring CageFScDtddtdS)NcagefsT) reinstall)r_rebuild_apache_directadminrrreconfigure_cagefsr'.s)H----!!!!!rcd}tj|sdSt|ddg}|jdkr"t jd|j|jdSdS)Nz"/usr/local/directadmin/directadminbuildapacherz6Error during rebuilding Apache. stdout: %s, stderr: %s) r rrrrr rrr)da_binr s rr%r%5su 1F 7>>& ! ! &'8, - -F !P v} 6 6 6 6 6r)rr r clcommon.constrclcommon.cpapir clconfigurerrclconfigure.packagesrrrr!r'r%r&rrr0s  """"""555555!!!!!!!!000000 !    #$$66%$6""" 66666r