mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 05:55:48 +01:00
added reset code to disable ONE plugin, updated FAQ
This commit is contained in:
23
app.js
23
app.js
@@ -211,6 +211,8 @@ function reset() {
|
|||||||
|
|
||||||
if (nconf.get('themes')) {
|
if (nconf.get('themes')) {
|
||||||
resetThemes();
|
resetThemes();
|
||||||
|
} else if (nconf.get('plugin')) {
|
||||||
|
resetPlugin(nconf.get('plugin'));
|
||||||
} else if (nconf.get('plugins')) {
|
} else if (nconf.get('plugins')) {
|
||||||
resetPlugins();
|
resetPlugins();
|
||||||
} else if (nconf.get('widgets')) {
|
} else if (nconf.get('widgets')) {
|
||||||
@@ -227,7 +229,7 @@ function reset() {
|
|||||||
process.exit();
|
process.exit();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log('no match');
|
winston.warn('[reset] Nothing reset.');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -260,6 +262,25 @@ function resetThemes(callback) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function resetPlugin(pluginId) {
|
||||||
|
var db = require('./src/database');
|
||||||
|
db.setRemove('plugins:active', pluginId, function(err, result) {
|
||||||
|
console.log(result);
|
||||||
|
if (err || result !== 1) {
|
||||||
|
winston.error('[reset] Could not disable plugin: ' + pluginId);
|
||||||
|
if (err) {
|
||||||
|
winston.error('[reset] Encountered error: ' + err.message);
|
||||||
|
} else {
|
||||||
|
winston.info('[reset] Perhaps it has already been disabled?');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
winston.info('[reset] Plugin `' + pluginId + '` disabled');
|
||||||
|
}
|
||||||
|
|
||||||
|
process.exit();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function resetPlugins(callback) {
|
function resetPlugins(callback) {
|
||||||
var db = require('./src/database');
|
var db = require('./src/database');
|
||||||
db.delete('plugins:active', function(err) {
|
db.delete('plugins:active', function(err) {
|
||||||
|
|||||||
@@ -7,13 +7,52 @@ Frequently Asked Questions
|
|||||||
|
|
||||||
If you experience difficulties setting up a NodeBB instance, perhaps one of the following may help.
|
If you experience difficulties setting up a NodeBB instance, perhaps one of the following may help.
|
||||||
|
|
||||||
|
How do I start/stop/restart NodeBB?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
You can call the ``./nodebb`` executable to start and stop NodeBB:
|
||||||
|
|
||||||
|
.. code:: bash
|
||||||
|
|
||||||
|
$ ./nodebb
|
||||||
|
Welcome to NodeBB
|
||||||
|
Usage: ./nodebb {start|stop|reload|restart|log|setup|reset|upgrade|dev|watch}
|
||||||
|
|
||||||
|
start Start the NodeBB server
|
||||||
|
stop Stops the NodeBB server
|
||||||
|
reload Restarts NodeBB
|
||||||
|
restart Restarts NodeBB
|
||||||
|
log Opens the logging interface (useful for debugging)
|
||||||
|
setup Runs the NodeBB setup script
|
||||||
|
reset Disables all plugins, restores the default theme.
|
||||||
|
upgrade Run NodeBB upgrade scripts, ensure packages are up-to-date
|
||||||
|
dev Start NodeBB in interactive development mode
|
||||||
|
watch Start NodeBB in development mode and watch for changes
|
||||||
|
|
||||||
|
How do I upgrade my NodeBB?
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Please consult :doc:`Upgrading NodeBB <../upgrading/index>`
|
||||||
|
|
||||||
|
I upgraded NodeBB and now X isn't working properly!
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Please consult :doc:`Upgrading NodeBB <../upgrading/index>`
|
||||||
|
|
||||||
|
I installed an incompatible plugin, and now my forum won't start!
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
If you know which plugin caused problems, disable it by running: ``./nodebb reset plugin="nodebb-plugin-pluginName"``
|
||||||
|
|
||||||
|
Otherwise, disable all plugins by running: ``./nodebb reset plugins``
|
||||||
|
|
||||||
Is it possible to install NodeBB via FTP?
|
Is it possible to install NodeBB via FTP?
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
It is possible to transfer the files to your remote server using FTP, but you do require shell access to the server in order to actually "start" NodeBB. Here is `a handy guide for installing NodeBB on DigitalOcean <http://burnaftercompiling.com/nodebb/setting-up-a-nodebb-forum-for-dummies/>`_
|
It is possible to transfer the files to your remote server using FTP, but you do require shell access to the server in order to actually "start" NodeBB. Here is `a handy guide for installing NodeBB on DigitalOcean <http://burnaftercompiling.com/nodebb/setting-up-a-nodebb-forum-for-dummies/>`_
|
||||||
|
|
||||||
I'm getting an "npm ERR!" error
|
I'm getting an "npm ERR!" error
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
For the most part, errors involving ``npm`` are due to Node.js being outdated. If you see an error similar to this one while running ``npm install``:
|
For the most part, errors involving ``npm`` are due to Node.js being outdated. If you see an error similar to this one while running ``npm install``:
|
||||||
|
|
||||||
@@ -32,11 +71,6 @@ To do this on Ubuntu:
|
|||||||
# apt-get update && apt-get dist-upgrade -y
|
# apt-get update && apt-get dist-upgrade -y
|
||||||
# apt-cache policy nodejs // should show a version higher than 0.8
|
# apt-cache policy nodejs // should show a version higher than 0.8
|
||||||
|
|
||||||
I upgraded NodeBB and now X isn't working properly!
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Please consult [[Upgrading NodeBB]]
|
|
||||||
|
|
||||||
|
|
||||||
Submit Bugs on our Issue Tracker
|
Submit Bugs on our Issue Tracker
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user