Skip to content

Getting to know the tools in bin

elacour edited this page Dec 9, 2016 · 3 revisions

The bin folder contains a bunch of tools scripts to make Etherpad work for you.

backendTests.sh

Performs tests against Etherpads API, this needs extending to cover more backend tests.. Example.. bin/backendTests.sh

buildDebian.sh

Builds a dpkg debian .deb file from the source (must be run on a debby based distro).. Example.. bin/buildDebian.sh

buildForWindows.sh

Builds a Windows .zip file of Etherpad. Example.. bin/buildForWindows.sh

checkpad.js

Checks to see if a pad is currupt. Example.. bin/checkPad.js test Will test the pad with the padID "Test". It will display an error if it finds a fault..

convert.js

Exports all "Etherpad Old" legacy Pads and imports them into a modern Etherpad storage format. Example.. node convert.js convertTettings.json dump.sql

convertSettings.json.template

The example settings for convert.js

deb-src

These are the files used by the buildDebian.sh debian build script

debugRun.sh

Runs Etherpad with node-inspector which is a useful tool for debugging server side javascript. Example.. bin/debugRun.sh

deletePad.js

Remove a specific Pad. Example.. node bin/deletePad.js test

extractPadData.js

Extracts as much Pad data as possible so it can be used in a testing environment for debugging. Example.. node bin/extractPadData.js test

importSqlFile.js

Imports into Etherpad an SQL file dumped from the Old Etherpad. Example.. node bin/importSqlFile.js dump.sql

installDeps.sh

Installs all the dependencies required by Etherpad. This is run on first run automatically. It's rare you will need to run this so probably just don't.

installOnWindows.bat

I'm not sure this is used any more.

migrateDirtyDBtoMySQL.js

Migrate pads from DirtyDB(used in Etherpad by default) to MySQL. Set your MySQL user/pass etc in settings.json Example.. node bin/migrateDirtyDBtoMySQL.js

rebuildPad.js

Clones a pad to a new location up to a given revision. Useful for recovering a borked pad to a known good revision without changing the original. Example.. node bin/rebuildPad.js old_pad_id 12345 new_pad_id

repairPad.js

Extracts all data of a pad, removes and inserts it again. The idea is to repair a pad if it has gone "faulty". Example.. node bin/repairPad.js test

run.sh

Manually starts Etherpad on Linux/Unix. Example.. bin/run.sh

You can also pass the settings file as --settings thatSettingsFile.json for example bin/run.sh --settings thatSettingsFile.json or bin/run.sh --settings /home/etherpad/thatSettingsFile.json

cleanRun.sh

Removes the src/node_modules folder, doing a clean install of all dependencies then manually starts Etherpad on Linux/Unix. Example.. bin/cleanRun.sh

You can also pass the settings file as --settings thatSettingsFile.json for example bin/run.sh --settings thatSettingsFile.json or bin/run.sh --settings /home/etherpad/thatSettingsFile.json

safeRun.sh

This is a script often used by init scripts and other startup scripts. You can use it to email you when Etherpad fails. It keeps Etherpad running and helps with log handling. You would usually run this script when you want to start in production but you would usually specify this script with a startup script. Example bin/safeRun.sh /var/log/etherpad.log

updatePlugins.sh

This script can be used to update all your pluigins on your Etherpad instance. Example bin/updatePlugins.sh

dirty-db-cleaner.py

Prunes outdated entries from dirty.db, potentially saving large amounts of disk space. Note that it is best to run this script with etherpad switched off, and keep in mind that it does not automatically overwrite the existing dirty.db file, but creates a new file named dirty.db.new. You must rename/move things around for the changes to take effect. Example bin/dirty-db-cleaner.py /path/to/dirty.db

General

Resources

For Developers

How to's

Set up

Advanced steps

Integrating Etherpad in your web app

for Developers

Clone this wiki locally