f948e29085
-More graceful shutdown of node cluster on 'npm stop' with better cleanup of resources on exit -Added new stop_explorer.sh script which looks up the explorer port # via settings file and closes the application running on that port # instead of saving and killing the process by pid as it did before -Added support for pm2 and forever using 'npm run start-pm2' and 'npm run start-forever' respectively -pm2 is automatically installed when starting with 'npm run start-pm2' if it is not already installed -forever is automatically installed when starting with 'npm run start-forever' if it is not already installed -Updated existing npm commands in package.json by replacing hardcoded 'node' with '$(which node)' -/path/to/nodejs changed to /path/to/node in the /settings.json.template, /lib/settings.js and /scripts/sync.js files -README updates: -Added a new 'Start/Stop the Explorer' section -Added PM2 instructions to the 'Start/Stop the Explorer' section -Moved Start/Stop Explorer instructions to the 'Start/Stop the Explorer' section -Moved Forever instructions to the 'Start/Stop the Explorer' section -/path/to/nodejs changed to /path/to/node -Some additional small misc fixes
34 lines
879 B
Bash
34 lines
879 B
Bash
#!/bin/bash
|
|
|
|
## Check if new module directory exists
|
|
#if [ ! -d ./node_modules/change_to_module_dir_name ]; then
|
|
# # Install updated packages
|
|
# npm update
|
|
#fi
|
|
|
|
# Check if an argument was passed into this script
|
|
if [ -n "${1}" ]; then
|
|
# Determine which argument was passed
|
|
case "${1}" in
|
|
"pm2")
|
|
# Check if pm2 is installed
|
|
if [ -z "$(which pm2)" ]; then
|
|
# Install pm2
|
|
npm install pm2@latest -g
|
|
fi
|
|
;;
|
|
"forever")
|
|
# Check if forever is installed
|
|
if [ -z "$(which forever)" ]; then
|
|
# Install forever
|
|
npm install forever -g
|
|
fi
|
|
;;
|
|
esac
|
|
fi
|
|
|
|
# Ensure that selected theme is properly installed
|
|
sh ./scripts/sass_theme_reader.sh
|
|
|
|
# Run sass module to generate minified css from scss file
|
|
./node_modules/.bin/sass --no-source-map --style=compressed ./public/css/style.scss ./public/css/style.min.css |