From 58764b7d7547c5292fe2ecfae45c18ff59199453 Mon Sep 17 00:00:00 2001 From: Su Yang Date: Wed, 11 Sep 2024 04:31:07 +0800 Subject: [PATCH] fix: docker env init check --- docker/docker-entrypoint.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docker/docker-entrypoint.js b/docker/docker-entrypoint.js index f5fcecf..b4bfc60 100644 --- a/docker/docker-entrypoint.js +++ b/docker/docker-entrypoint.js @@ -1,7 +1,7 @@ #!/usr/bin/env node -const { existsSync, unlinkSync } = require("fs"); +const { existsSync, unlinkSync, writeFileSync } = require("fs"); -if (existsSync("./data/users")) { +if (existsSync("../conf/install.ed")) { console.log("Docker Env already configured."); require("../lib/main.js"); } else { @@ -54,6 +54,7 @@ if (existsSync("./data/users")) { storage.shutdown(function () { console.log("Docker Env Fixed."); require("../lib/main.js"); + writeFileSync("../conf/install.ed", ""); }); }); });