서버 예약 오픈을 UI에 통합

This commit is contained in:
2018-04-25 02:56:11 +09:00
parent 6253b757ec
commit 23fb1194ee
7 changed files with 96 additions and 6 deletions
+12 -1
View File
@@ -27,17 +27,28 @@ def main():
break
servList = []
autoResetList = []
for path in glob.glob(basepath+'/*/d_setting/DB.php'):
servPath = os.path.dirname(os.path.dirname(path))
servRelPath = os.path.relpath(servPath, basepath)
resetAbsPath = servPath + '/j_autoreset.php'
resetPath = webBase + '/' + servRelPath + '/j_autoreset.php'
if os.path.exists(resetAbsPath):
autoResetList.append(resetPath)
if servPath in hiddenList:
continue
servRelPath = os.path.relpath(servPath, basepath)
webPath = webBase + '/' + servRelPath + '/proc.php'
servList.append(webPath)
with concurrent.futures.ThreadPoolExecutor(max_workers=len(servList)) as executor:
waiters=[]
for resetPath in autoResetList:
future = executor.submit(run, resetPath)
waiters.append(future)
for _ in range(4):
for webPath in servList:
future = executor.submit(run, webPath)
+14 -1
View File
@@ -7,4 +7,17 @@ Deny from all
SetEnvIf X-Forwarded-For ^<?=str_replace('.', '\\.', $allow_ip)?> env_allow_1
Allow from env=env_allow_1
Allow from <?=$allow_ip?>
<?php endif; ?>
<?php endif; ?>
<Files j_install.php>
Allow from all
</Files>
<Files install.php>
Allow from all
</Files>
<Files j_server_basic_info.php>
Allow from all
</Files>
<Files ~ "\.(xml|css|jpe?g|png|gif|js|pdf)$">
Allow from all
</Files>