-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
152 changed files
with
6,648 additions
and
5,271 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ npm-debug.log | |
.ep_initialized | ||
*.crt | ||
*.key | ||
bin/etherpad-1.deb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/usr/bin/env bash | ||
|
||
# IMPORTANT | ||
# Protect agaisnt mispelling a var and rm -rf / | ||
set -u | ||
set -e | ||
|
||
SRC=/tmp/etherpad-deb-src | ||
DIST=/tmp/etherpad-deb-dist | ||
SYSROOT=${SRC}/sysroot | ||
DEBIAN=${SRC}/DEBIAN | ||
|
||
rm -rf ${DIST} | ||
mkdir -p ${DIST}/ | ||
|
||
rm -rf ${SRC} | ||
rsync -a bin/deb-src/ ${SRC}/ | ||
mkdir -p ${SYSROOT}/opt/ | ||
|
||
rsync --exclude '.git' -a . ${SYSROOT}/opt/etherpad/ --delete | ||
mkdir -p ${SYSROOT}/usr/share/doc | ||
cp README.md ${SYSROOT}/usr/share/doc/etherpad | ||
find ${SRC}/ -type d -exec chmod 0755 {} \; | ||
find ${SRC}/ -type f -exec chmod go-w {} \; | ||
chown -R root:root ${SRC}/ | ||
|
||
let SIZE=`du -s ${SYSROOT} | sed s'/\s\+.*//'`+8 | ||
pushd ${SYSROOT}/ | ||
tar czf ${DIST}/data.tar.gz [a-z]* | ||
popd | ||
sed s"/SIZE/${SIZE}/" -i ${DEBIAN}/control | ||
pushd ${DEBIAN} | ||
tar czf ${DIST}/control.tar.gz * | ||
popd | ||
|
||
pushd ${DIST}/ | ||
echo 2.0 > ./debian-binary | ||
|
||
find ${DIST}/ -type d -exec chmod 0755 {} \; | ||
find ${DIST}/ -type f -exec chmod go-w {} \; | ||
chown -R root:root ${DIST}/ | ||
ar r ${DIST}/etherpad-1.deb debian-binary control.tar.gz data.tar.gz | ||
popd | ||
rsync -a ${DIST}/etherpad-1.deb ./ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Package: etherpad | ||
Version: 1.3 | ||
Section: base | ||
Priority: optional | ||
Architecture: i386 | ||
Installed-Size: SIZE | ||
Depends: | ||
Maintainer: John McLear <[email protected]> | ||
Description: Etherpad is a collaborative editor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
# Start the services! | ||
|
||
service etherpad start | ||
echo "Give Etherpad about 3 minutes to install dependencies then visit http://localhost:9001 in your web browser" | ||
echo "To stop etherpad type 'service etherpad stop', To restart type 'service etherpad restart'". | ||
rm -f /tmp/etherpad.log /tmp/etherpad.err |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Installs node if it isn't already installed | ||
# | ||
# Don't steamroll over a previously installed node version | ||
# TODO provide a local version of node? | ||
|
||
VER="0.10.4" | ||
ARCH="x86" | ||
if [ `arch | grep 64` ] | ||
then | ||
ARCH="x64" | ||
fi | ||
|
||
# TODO test version | ||
if [ ! -f /usr/local/bin/node ] | ||
then | ||
pushd /tmp | ||
wget -c "http://nodejs.org/dist/v${VER}/node-v${VER}-linux-${ARCH}.tar.gz" | ||
rm -rf /tmp/node-v${VER}-linux-${ARCH} | ||
tar xf node-v${VER}-linux-${ARCH}.tar.gz -C /tmp/ | ||
cp -a /tmp/node-v${VER}-linux-${ARCH}/* /usr/local/ | ||
fi | ||
|
||
# Create Etherpad user | ||
adduser --system etherpad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
# Stop the appserver: | ||
service etherpad stop || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
description "etherpad" | ||
|
||
start on started networking | ||
stop on runlevel [!2345] | ||
|
||
env EPHOME=/opt/etherpad | ||
env EPLOGS=/var/log/etherpad | ||
env EPUSER=etherpad | ||
|
||
respawn | ||
|
||
pre-start script | ||
cd $EPHOME | ||
mkdir $EPLOGS ||true | ||
chown $EPUSER $EPLOGS ||true | ||
chmod 0755 $EPLOGS ||true | ||
chown -R $EPUSER $EPHOME/var ||true | ||
$EPHOME/bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; } | ||
end script | ||
|
||
script | ||
cd $EPHOME/ | ||
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \ | ||
>> $EPLOGS/access.log \ | ||
2>> $EPLOGS/error.log | ||
echo "Etherpad is running on http://localhost:9001 - To change settings edit /opt/etherpad/settings.json" | ||
|
||
end script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Editbar | ||
srf/static/js/pad_editbar.js | ||
|
||
## isEnabled() | ||
|
||
## disable() | ||
|
||
## toggleDropDown(dropdown, callback) | ||
Shows the dropdown `div.popup` whose `id` equals `dropdown`. | ||
|
||
## registerCommand(cmd, callback) | ||
Register a handler for a specific command. Commands are fired if the corresponding button is clicked or the corresponding select is changed. | ||
|
||
## registerAceCommand(cmd, callback) | ||
Creates an ace callstack and calls the callback with an ace instance: `callback(cmd, ace)`. | ||
|
||
Example: | ||
``` | ||
toolbar.registerAceCommand("insertorderedlist", function (cmd, ace) { | ||
ace.ace_doInsertOrderedList(); | ||
}); | ||
``` | ||
|
||
## registerDropdownCommand(cmd, dropdown) | ||
Ties a `div.popup` where `id` equals `dropdown` to a `command` fired by clicking a button. | ||
|
||
## triggerCommand(cmd[, item]) | ||
Triggers a command (optionally with some internal representation of the toolbar item that triggered it). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.