removing timeout before restarting nodebb, fixing nodebb executable

v1.18.x
Julian Lam 11 years ago
parent 64c4dd7e63
commit d6a1fad527

@ -2,16 +2,16 @@ var fork = require('child_process').fork,
start = function() {
var nbb = fork('./app', [], {
env: {
'NODE_ENV': 'development'
'NODE_ENV': process.env.NODE_ENV
}
});
nbb.on('message', function(cmd) {
if (cmd === 'nodebb:restart') {
nbb.kill();
setTimeout(function() {
nbb.on('exit', function() {
start();
}, 1000);
});
nbb.kill();
}
});
};

@ -6,57 +6,40 @@
case "$1" in
start)
node app "$@"
node loader "$@"
;;
upgrade)
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 app --upgrade
node loader --upgrade
touch package.json
echo -e "\n\e[00;32mNodeBB Dependencies up-to-date!\e[00;00m";
;;
setup)
node app --setup
node loader --setup
;;
reset)
node app --reset
;;
reset)
node loader --reset
;;
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 app "$@"
NODE_ENV=development node loader "$@"
;;
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 --extensions 'node|js|tpl' -- app "$@"
NODE_ENV=development supervisor -q --extensions 'node|js|tpl' -- loader "$@"
;;
# language)
# case "$2" in
# check)
# node app --language="check"
# ;;
# *)
# echo "Language Settings"
# echo $"Usage: $0 language {check}"
# echo ''
# column -s ' ' -t <<< '
# check Compare language files against the /en directory
# '
# ;;
# esac
# ;;
*)
echo "Welcome to NodeBB"
echo $"Usage: $0 {start|dev|watch|upgrade}"

Loading…
Cancel
Save