Skip to content

Commit

Permalink
fix: docker env init check
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Sep 10, 2024
1 parent 3c8ef81 commit 58764b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docker/docker-entrypoint.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -54,6 +54,7 @@ if (existsSync("./data/users")) {
storage.shutdown(function () {
console.log("Docker Env Fixed.");
require("../lib/main.js");
writeFileSync("../conf/install.ed", "");
});
});
});
Expand Down

0 comments on commit 58764b7

Please sign in to comment.