mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
Optional key load in make
This commit is contained in:
parent
db6a7bd73b
commit
8b60ba764f
2 changed files with 23 additions and 17 deletions
5
make.sh
5
make.sh
|
@ -44,6 +44,11 @@ if [ "$?" -ne "0" ]; then
|
|||
echo '{"Subjects":[],"version":"TESET","motd":"hai"}' > ./public/data.json
|
||||
fi
|
||||
|
||||
pushd utils
|
||||
rm -v ../data/dbs/users.db
|
||||
NS_SQL_DEBUG_LOG=true NS_LOGLEVEL=2 node dbSetup.js
|
||||
popd
|
||||
|
||||
echo "Done!"
|
||||
echo "npm start {loglevel}"
|
||||
echo "To start server"
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
const utils = require('../utils/utils.js')
|
||||
const logger = require('../utils/logger.js')
|
||||
const dbtools = require('../utils/dbtools.js')
|
||||
|
@ -25,6 +24,7 @@ function CreateDB () {
|
|||
})
|
||||
|
||||
try {
|
||||
if (utils.FileExists('../dbUsers/keys')) {
|
||||
const uids = utils.ReadFile('../dbUsers/keys').split('\n')
|
||||
|
||||
uids.forEach((cid, i) => {
|
||||
|
@ -42,6 +42,7 @@ function CreateDB () {
|
|||
console.error(e)
|
||||
}
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue