Update task.py

This commit is contained in:
Mr Chen
2019-03-19 16:28:59 +08:00
parent dbbc243359
commit e2196735d9
+2 -1
View File
@@ -387,7 +387,8 @@ def startPHPVersion(version):
cgi = '/tmp/php-cgi-'+version + '.sock'
pid = sdir+'/php/'+version+'/var/run/php-fpm.pid';
data = public.execShell("ps -ef | grep php/"+version+" | grep -v grep|grep -v python |awk '{print $2}'")
print data
if data[0] != '' :
os.system("ps -ef | grep php/"+version+" | grep -v grep|grep -v python |awk '{print $2}' | xargs kill ")
time.sleep(0.5);
if not os.path.exists(cgi): os.system('rm -f ' + cgi);
if not os.path.exists(pid): os.system('rm -f ' + pid);