Skip to content

Commit 9a8df91

Browse files
committed
Merge branch 'master' into install-fixes-for-achrails
2 parents bea154c + fdffda8 commit 9a8df91

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

layersbox

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -454,12 +454,12 @@ def box_install(args):
454454
db_exists = False
455455
with open(join(servicedir, service_name, env_file)) as infile:
456456
for line in infile:
457-
if "_MYSQL_NAME" in line:
458-
db_key = line.split("_MYSQL_NAME=")[0]
457+
if "_DB_NAME" in line:
458+
db_key = line.split("_DB_NAME=")[0]
459459
db_name = line.split("=")[1]
460-
elif "_MYSQL_USERNAME" in line:
460+
elif "_DB_USER" in line:
461461
db_username = line.split("=")[1]
462-
elif "_MYSQL_FILE" in line:
462+
elif "_DB_FILE" in line:
463463
db_file = line.split("=")[1].replace('\n', '')
464464
db_exists = True
465465
shutil.copyfile(join(servicedir, service_name, db_file), join(dir, "tmp", "sqlfile", "db.sql"))
@@ -476,7 +476,7 @@ def box_install(args):
476476
db_password = mysqlcreate_output.split(" -p")[1].split(" -hmysql")[0]
477477
# write password to env file
478478
with open(join(servicedir, service_name, env_file), "a") as outfile:
479-
outfile.write("{}_MYSQL_PASSWORD={}".format(db_key, db_password))
479+
outfile.write("{}_DB_PASS={}".format(db_key, db_password))
480480

481481
# clean up and delete secret.env content, otherwise db is created again
482482
with open(join(dir, "tmp", "secret.env"), "w"):

0 commit comments

Comments
 (0)