feat: for v0.29

This commit is contained in:
2022-03-13 21:38:52 +09:00
parent 3cad468335
commit 22f37cbdec
3 changed files with 11 additions and 5 deletions
+1
View File
@@ -14,6 +14,7 @@ if [ ! -f "$samRoot/index.php" ]; then
mkdir -p $samRoot mkdir -p $samRoot
chown -R www-data:www-data $wwwRoot chown -R www-data:www-data $wwwRoot
gosu www-data git clone $gameGitPath $samRoot gosu www-data git clone $gameGitPath $samRoot
gosu www-data git checkout $gameGitBranch
fi fi
if [ "$HIDCHE_IMAGE_USE_INTERNAL" = "yes" ] && [ ! -d "$imageRoot" ]; then if [ "$HIDCHE_IMAGE_USE_INTERNAL" = "yes" ] && [ ! -d "$imageRoot" ]; then
+1
View File
@@ -2,6 +2,7 @@
#서버 git 주소. #서버 git 주소.
#만약 https:// 대신 ssh://로 시작하는 주소를 사용하는 경우 app/id_ecdsa, app/known_host 에 ecdsa 개인키와 ssh값을 추가할 것. #만약 https:// 대신 ssh://로 시작하는 주소를 사용하는 경우 app/id_ecdsa, app/known_host 에 ecdsa 개인키와 ssh값을 추가할 것.
gameGitPath=ssh://git@storage.hided.net:2525/devsam/core.git gameGitPath=ssh://git@storage.hided.net:2525/devsam/core.git
gameGitBranch=devel
imgGitPath=ssh://git@storage.hided.net:2525/devsam/image.git imgGitPath=ssh://git@storage.hided.net:2525/devsam/image.git
#게임 시간대. #게임 시간대.
+9 -5
View File
@@ -43,14 +43,18 @@ if not os.path.exists(indexPHP):
fp.close() fp.close()
while True: while True:
try: try:
r = requests.head('http://web/sam/f_install/j_install_status.php') r = requests.head('http://web/sam/f_install/j_install_status.php')
if r.status_code == 200: if r.status_code == 503 or r.status_code == 500:
b = requests.get('http://web/sam/install.php', timeout=60000)
elif r.status_code == 200:
break break
except Exception: except Exception:
pass pass
print("Waiting for web connection...", flush=True) print("Waiting for web connection...", flush=True)
time.sleep(2) time.sleep(2)
requests.get('http://web/sam/install.php', timeout=60000) #NPM
while True: while True:
result = subprocess.call('nc -z -v -w30 db 3306'.split(' '), stderr=subprocess.STDOUT) result = subprocess.call('nc -z -v -w30 db 3306'.split(' '), stderr=subprocess.STDOUT)
@@ -109,8 +113,8 @@ serverList.reverse()
for serverName in serverList: for serverName in serverList:
updateResult = session.post('http://web/sam/j_updateServer.php', { updateResult = session.post('http://web/sam/j_updateServer.php', {
'server':serverName, 'server':serverName,
'target':'origin/devel' 'target':'origin/'+env['gameGitBranch']
}, headers=headers) }, headers=headers, timeout=60000)
print(serverName, updateResult.text, flush=True) print(serverName, updateResult.text, flush=True)
db_pw = hash_password(serverName+env['HIDCHE_PW_SALT'], env['MARIADB_ROOT_PASSWORD'])[:32] db_pw = hash_password(serverName+env['HIDCHE_PW_SALT'], env['MARIADB_ROOT_PASSWORD'])[:32]