Skip to content

Commit

Permalink
Update public.py
Browse files Browse the repository at this point in the history
ulimit 不应作为必要条件,部分容器等环境下不支持 ulimit 设置过大
  • Loading branch information
safly authored Jul 2, 2019
1 parent 10d7cbe commit 300e5b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions class/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,10 +734,10 @@ def checkWebConfig():
if os.path.exists(f3): os.remove(f3)

if get_webserver() == 'nginx':
result = ExecShell("ulimit -n 8192 && /www/server/nginx/sbin/nginx -t -c /www/server/nginx/conf/nginx.conf");
result = ExecShell("ulimit -n 8192 ; /www/server/nginx/sbin/nginx -t -c /www/server/nginx/conf/nginx.conf");
searchStr = 'successful'
else:
result = ExecShell("ulimit -n 8192 && /www/server/apache/bin/apachectl -t");
result = ExecShell("ulimit -n 8192 ; /www/server/apache/bin/apachectl -t");
searchStr = 'Syntax OK'

if result[1].find(searchStr) == -1:
Expand Down Expand Up @@ -1252,4 +1252,4 @@ def set_own(filename,user,group=None):
user = user_info.pw_uid
group = user_info.pw_gid
os.chown(filename,user,group)
return True
return True

0 comments on commit 300e5b9

Please sign in to comment.