Wiki Admin

We consider how a production server could be managed with Shell plugin markup. Only a logged in administrator can run these scripts. See also Config Notes

cd /usr/local/lib/node_modules/wiki npm i wiki-plugin-shell

echo hello world echo `npm prefix -g`/lib/node_modules/wiki pwd

What versions are available to wiki. The running wiki might be serving fewer than these if plugins have been installed since restart.

wiki -v

We can look into the node_modules directory of wiki when it is installed in the usual place. There might be links if plugins are developmental versions.

cd `npm prefix -g`/lib/node_modules/wiki ls -l node_modules |\ cut -c 33- |\ perl -pe 's/->/\n ⇒/g'

Look for plugins that have been installed or linked locally.

node=`npm prefix -g`/lib/node_modules wiki=$node/wiki/node_modules (cd $node; ls -d wiki-plugin-* )>/tmp/$$.node (cd $wiki; ls -d wiki-plugin-* )>/tmp/$$.wiki diff /tmp/$$.node /tmp/$$.wiki | grep '<'

Add missing plugins by linking to wiki's global install.

cd `npm prefix -g`/lib/node_modules/wiki ( npm link wiki-plugin-microtalk npm link wiki-plugin-slide ) |\ perl -pe 's/->/\n ⇒/g'

Add missing plugins by installing recent from npm.

cd `npm prefix -g`/lib/node_modules/wiki npm i wiki-plugin-cytodemo npm i wiki-plugin-bikeshare npm i wiki-plugin-rss npm i wiki-plugin-json npm i wiki-plugin-map npm i wiki-plugin-graph npm i wiki-plugin-plugins npm i wiki-plugin-morseteacher npm i wiki-plugin-rostermatic npm i wiki-plugin-plugmatic

And a few more plugins we forgot.

cd `npm prefix -g`/lib/node_modules/wiki npm i wiki-plugin-tab