Update task.py

pull/109/head
Mr Chen 6 years ago
parent 3552d014ce
commit 216a857cc2
  1. 3
      task.py

@ -387,7 +387,8 @@ def startPHPVersion(version):
cgi = '/tmp/php-cgi-'+version + '.sock' cgi = '/tmp/php-cgi-'+version + '.sock'
pid = sdir+'/php/'+version+'/var/run/php-fpm.pid'; 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}'") 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); time.sleep(0.5);
if not os.path.exists(cgi): os.system('rm -f ' + cgi); if not os.path.exists(cgi): os.system('rm -f ' + cgi);
if not os.path.exists(pid): os.system('rm -f ' + pid); if not os.path.exists(pid): os.system('rm -f ' + pid);

Loading…
Cancel
Save