mirror of
https://github.com/wekan/wekan.git
synced 2025-04-22 21:17:18 -04:00
WRITABLE_PATH must be writable, otherwise abort starting Wekan
This commit is contained in:
parent
5fc5500845
commit
0426e09cd7
1 changed files with 22 additions and 0 deletions
22
server/00checkStartup.js
Normal file
22
server/00checkStartup.js
Normal file
|
@ -0,0 +1,22 @@
|
|||
var fs = require('fs');
|
||||
|
||||
let error = false
|
||||
|
||||
if (!process.env.WRITABLE_PATH) {
|
||||
console.error("WRITABLE_PATH environment variable missing and/or unset, please configure !");
|
||||
error = true;
|
||||
} else {
|
||||
try {
|
||||
fs.accessSync(process.env.WRITABLE_PATH, fs.constants.W_OK);
|
||||
} catch (err) {
|
||||
error = true;
|
||||
console.error("can't write to " + process.env.WRITABLE_PATH, err);
|
||||
console.error("the path of WRITABLE_PATH (" + process.env.WRITABLE_PATH + ") must be writable !!!");
|
||||
}
|
||||
}
|
||||
|
||||
if (error) {
|
||||
console.error("Stopping Wekan");
|
||||
console.error("Wekan isn't runable. Please resolve the error's above and restart Wekan !");
|
||||
process.exit(1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue