Skip to content

Node.js based forum software built for the modern web

In --no-daemon unlink of nonexisting pidfile

Davis7f95bdfe6f3b
diff --git a/loader.js b/loader.js
index eb29cdca74..f2a511336b 100644
--- a/loader.js
+++ b/loader.js
@@ -187,7 +187,9 @@ Loader.stop = function () {
killWorkers();
// Clean up the pidfile
- fs.unlinkSync(pidFilePath);
+ if (nconf.get('daemon') !== 'false' && nconf.get('daemon') !== false) {
+ fs.unlinkSync(pidFilePath);
+ }
};
function killWorkers() {