added reset code to disable ONE plugin, updated FAQ

v1.18.x
Julian Lam 11 years ago
parent cd9abcde74
commit 52cb62960f

@ -211,6 +211,8 @@ function reset() {
if (nconf.get('themes')) {
resetThemes();
} else if (nconf.get('plugin')) {
resetPlugin(nconf.get('plugin'));
} else if (nconf.get('plugins')) {
resetPlugins();
} else if (nconf.get('widgets')) {
@ -227,7 +229,7 @@ function reset() {
process.exit();
});
} 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) {
var db = require('./src/database');
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.
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?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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-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
--------------------------------
@ -47,4 +81,4 @@ Before reporting bugs, please ensure that the issue has not already been filed o
Ask the NodeBB Community
------------------------
Having trouble installing NodeBB? Or did something break? Don't hesitate to `join our forum <community.nodebb.org/register>`_ and ask for help. Hopefully one day you'll be able to help others too :)
Having trouble installing NodeBB? Or did something break? Don't hesitate to `join our forum <community.nodebb.org/register>`_ and ask for help. Hopefully one day you'll be able to help others too :)
Loading…
Cancel
Save