Add dbInit for bot

This commit is contained in:
thiloho
2023-09-10 23:19:41 +02:00
parent 4cdff4bc69
commit 27f67a386b
3 changed files with 42 additions and 27 deletions

View File

@@ -108,9 +108,10 @@
wantedBy = ["multi-user.target"];
after = ["network-online.target"];
serviceConfig = {
ExecStart = "${pkgs.nodejs_20}/bin/node index.js --token=$CREDENTIALS_DIRECTORY/bot.token";
ExecStartPre = "${pkgs.nodejs_20}/bin/node dbInit.js";
ExecStart = "${pkgs.nodejs_20}/bin/node index.js --token=%d/bot.token";
LoadCredential = "bot.token:/var/run/bot-token.txt";
WorkingDirectory = inputs.denbot;
WorkingDirectory = inputs.denbot.packages.${pkgs.system}.default;
Restart = "always";
};
};