gNddlZddlZddlmZmZeddZdS)N)runtaskzUnloading lve modulecNtddg}|j|jngfddD}|rtddg|tgd}tjd rt jd dSdS) zO Restart services that still use lve device and unload lve module then lsofz/dev/lveNcLg|]tfdD S)c3BK|]}|VdS)N) startswith).0lineservices py/clconfigure/lve.py z/unload_lve_module...s/EEDtw''EEEEEE)any)r r res_stdout_liness @r z%unload_lve_module..sN EEEE4DEEE E Er)mysqldmariadbhttpd systemctlrestart)modprobez-rfkmodlvez/sys/module/kmodlvez:Failed to unload the lve module. Please reboot the server.)rstdoutsplitpathlibPathexistsloggingwarning)resservicesrs @r unload_lve_moduler# s vz" # #C-0Z-Csz'')))=H 1 [) /h /000 ,,, - -C|)**1133VTUUUUUVVr)rr clconfigurerrr#rr r&sg !!!!!!!!VVVVVr