Bug fixes
This commit is contained in:
parent
da745e212f
commit
afce8a68a7
12
functions.js
12
functions.js
@ -132,7 +132,10 @@ const functions = {
|
||||
return new Promise((resolve) => {
|
||||
if (config.debugMode) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: Pausing for ${config.intervals.pause}ms`);
|
||||
|
||||
functions.sleep(config.intervals.pause).then(() => { resolve(); });
|
||||
functions.sleep(config.intervals.pause).then((res) => {
|
||||
if (config.debugMode) console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: Pause finished.`);
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
},
|
||||
// Reload the environment variables on the fly
|
||||
@ -239,7 +242,10 @@ const functions = {
|
||||
});
|
||||
},
|
||||
checkForQuit() {
|
||||
if (config.status.shutdownNextCycle == 1) process.exit();
|
||||
if (config.status.shutdownNextCycle == 1) {
|
||||
console.log(`[${(Date.now() - config.timestamps.procStart)/1000}] I: Exiting Process!`);
|
||||
process.exit();
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
if (fs.existsSync('./quit')) {
|
||||
fs.unlink('./quit', err => {
|
||||
@ -248,6 +254,8 @@ const functions = {
|
||||
config.status.auger = 0;
|
||||
resolve();
|
||||
});
|
||||
} else {
|
||||
resolve('Not shutting down');
|
||||
}
|
||||
});
|
||||
},
|
||||
|
@ -35,6 +35,7 @@ echo -e "
|
||||
[ Hestia Control Panel ]
|
||||
|
||||
This script is being run from: '$(pwd)'
|
||||
Active Nodes: $(ps ax -o pid,user,command | grep 'node websvr.js' | grep -v grep)
|
||||
|
||||
Please enter an option from below:
|
||||
|
||||
@ -64,7 +65,7 @@ case "$opt" in
|
||||
3)
|
||||
# View logs
|
||||
clear
|
||||
cat log.txt | less
|
||||
less log.txt
|
||||
;;
|
||||
0)
|
||||
# Exit the script
|
||||
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"debugMode": false,
|
||||
"debugMode": true,
|
||||
"status": {
|
||||
"igniter": 0,
|
||||
"blower": 0,
|
||||
|
Loading…
Reference in New Issue
Block a user