closed #1421 use --no-daemon flag to... not daemonize. Also, install script can be canceled without throwing errors.

v1.18.x
Julian Lam 11 years ago
parent 33bba9b596
commit a796940064

@ -76,7 +76,7 @@ var nconf = require('nconf'),
nconf.argv();
// Start the daemon!
if (nconf.get('d')) {
if (nconf.get('daemon') !== false) {
// Check for a still-active NodeBB process
if (fs.existsSync(pidFilePath)) {
try {

@ -77,31 +77,31 @@ case "$1" in
npm install
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm install
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm update
node loader --upgrade
node app --upgrade
touch package.json
echo -e "\n\e[00;32mNodeBB Dependencies up-to-date!\e[00;00m";
;;
setup)
node loader --setup "$@"
node app --setup "$@"
;;
reset)
node loader --reset --$2
node app --reset --$2
;;
dev)
echo "Launching NodeBB in \"development\" mode."
echo "To run the production build of NodeBB, please use \"forever\"."
echo "More Information: https://github.com/designcreateplay/NodeBB/wiki/How-to-run-NodeBB"
NODE_ENV=development node loader "$@"
NODE_ENV=development node loader --no-daemon "$@"
;;
watch)
echo "Launching NodeBB in \"development\" mode."
echo "To run the production build of NodeBB, please use \"forever\"."
echo "More Information: https://github.com/designcreateplay/NodeBB/wiki/How-to-run-NodeBB"
NODE_ENV=development supervisor -q --ignore public/templates --extensions 'node|js|tpl' -- app "$@"
NODE_ENV=development supervisor -q --ignore public/templates --extensions 'node|js|tpl' -- loader --no-daemon "$@"
;;
*)

@ -140,6 +140,12 @@ function setupConfig(next) {
if (!install.values) {
prompt.get(questions.main, function(err, config) {
if (err) {
process.stdout.write('\n\n');
winston.warn('NodeBB setup ' + err.message);
process.exit();
}
if (nconf.get('advanced')) {
prompt.get({
name: 'secondary_database',

Loading…
Cancel
Save