How to disable a plugin in NanoBlogger in Debian GNU/Linux

To disable a plugin in NanoBlogger version 3.2 one must rename the plugin script, e.g.tidy.sh, to modify its extension (by convention into .off).

In the nanoblogger Debian GNU/Linux package, plugins are installed in the/usr/share/nanoblogger/plugins/ directory. In order to enable/disable plugins, it is therefore necessary to rename files in that directory, e.g. for the tidy.sh plugin:

sudo mv /usr/share/nanoblogger/plugins/makepage/tidy.sh \
    /usr/share/nanoblogger/plugins/makepage/tidy.off

The problem with that method is that when the nanoblogger package is updated, thetidy.sh file is reinstalled in /usr/share/nanoblogger/plugins/makepage/ along with the tidy.off file, which re-enables the plugin. To make the renaming permanent accross package updates, one must use Debian’s diversion mechanism:

sudo dpkg-divert --divert /usr/share/nanoblogger/plugins/makepage/tidy.off \
    --rename --add /usr/share/nanoblogger/plugins/makepage/tidy.sh

This renames the tidy.sh file into tidy.off, and in all subsequent updates of the package the new tidy.sh files will also be renamed automatically.

To re-enable the plugin, simply remove the diversion:

sudo dpkg-divert --divert /usr/share/nanoblogger/plugins/makepage/tidy.off \
    --rename --remove /usr/share/nanoblogger/plugins/makepage/tidy.sh