mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 09:55:47 +01:00
closed #1421 use --no-daemon flag to... not daemonize. Also, install script can be canceled without throwing errors.
This commit is contained in:
@@ -76,7 +76,7 @@ var nconf = require('nconf'),
|
|||||||
nconf.argv();
|
nconf.argv();
|
||||||
|
|
||||||
// Start the daemon!
|
// Start the daemon!
|
||||||
if (nconf.get('d')) {
|
if (nconf.get('daemon') !== false) {
|
||||||
// Check for a still-active NodeBB process
|
// Check for a still-active NodeBB process
|
||||||
if (fs.existsSync(pidFilePath)) {
|
if (fs.existsSync(pidFilePath)) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
10
nodebb
10
nodebb
@@ -77,31 +77,31 @@ case "$1" in
|
|||||||
npm install
|
npm install
|
||||||
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm install
|
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm install
|
||||||
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm update
|
ls -d node_modules/nodebb* | xargs -n1 basename | xargs npm update
|
||||||
node loader --upgrade
|
node app --upgrade
|
||||||
touch package.json
|
touch package.json
|
||||||
echo -e "\n\e[00;32mNodeBB Dependencies up-to-date!\e[00;00m";
|
echo -e "\n\e[00;32mNodeBB Dependencies up-to-date!\e[00;00m";
|
||||||
;;
|
;;
|
||||||
|
|
||||||
setup)
|
setup)
|
||||||
node loader --setup "$@"
|
node app --setup "$@"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
reset)
|
reset)
|
||||||
node loader --reset --$2
|
node app --reset --$2
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dev)
|
dev)
|
||||||
echo "Launching NodeBB in \"development\" mode."
|
echo "Launching NodeBB in \"development\" mode."
|
||||||
echo "To run the production build of NodeBB, please use \"forever\"."
|
echo "To run the production build of NodeBB, please use \"forever\"."
|
||||||
echo "More Information: https://github.com/designcreateplay/NodeBB/wiki/How-to-run-NodeBB"
|
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)
|
watch)
|
||||||
echo "Launching NodeBB in \"development\" mode."
|
echo "Launching NodeBB in \"development\" mode."
|
||||||
echo "To run the production build of NodeBB, please use \"forever\"."
|
echo "To run the production build of NodeBB, please use \"forever\"."
|
||||||
echo "More Information: https://github.com/designcreateplay/NodeBB/wiki/How-to-run-NodeBB"
|
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) {
|
if (!install.values) {
|
||||||
prompt.get(questions.main, function(err, config) {
|
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')) {
|
if (nconf.get('advanced')) {
|
||||||
prompt.get({
|
prompt.get({
|
||||||
name: 'secondary_database',
|
name: 'secondary_database',
|
||||||
|
|||||||
Reference in New Issue
Block a user