From 04e0d075ec9488a8ccf8ae91949b75e6e462365c Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Fri, 9 Aug 2013 15:17:50 -0400 Subject: [PATCH] added upgrade file and nconf check --- app.js | 4 +++- src/upgrade.js | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 src/upgrade.js diff --git a/app.js b/app.js index f693ea1dea..f9c2ab523b 100644 --- a/app.js +++ b/app.js @@ -34,7 +34,9 @@ console.log('Info: This program comes with ABSOLUTELY NO WARRANTY.'); console.log('Info: This is free software, and you are welcome to redistribute it under certain conditions.'); console.log('Info: ==='); -if (!nconf.get('setup') && nconf.get('base_url')) { +if(nconf.get('upgrade')) { + require('./src/upgrade').upgrade(); +} else if (!nconf.get('setup') && nconf.get('base_url')) { nconf.set('url', nconf.get('base_url') + (nconf.get('use_port') ? ':' + nconf.get('port') : '') + nconf.get('relative_path') + '/'); nconf.set('upload_url', nconf.get('url') + 'uploads/'); global.nconf = nconf; diff --git a/src/upgrade.js b/src/upgrade.js new file mode 100644 index 0000000000..7e03e7575b --- /dev/null +++ b/src/upgrade.js @@ -0,0 +1,6 @@ + + +exports.upgrade = function() { + console.log('upgrading nodebb now'); + +} \ No newline at end of file