diff --git a/app.js b/app.js index 76e417c..f7ae388 100755 --- a/app.js +++ b/app.js @@ -185,6 +185,13 @@ app.use(function(err, req, res, next) { }); app.listen(app.get('port'), function() { + console.log("Node version:", process.versions.node); + fs.access(__dirname + "/crontabs/", fs.W_OK, function(err) { + if(err){ + console.error("Write access to", __dirname + "/crontabs/", "DENIED."); + process.exit(1); + } + }); // If --autosave is used then we will also save whatever is in the db automatically without having to mention it explictly // we do this by watching log file and setting a on change hook to it if (process.argv.includes("--autosave")){ diff --git a/package.json b/package.json index d4ea1ef..4d49360 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crontab-ui", - "version": "0.2.4", + "version": "0.2.5", "description": "Easy and safe way to manage your crontab file", "main": "index.js", "scripts": {