[jitsi-dev] Etherpad


#1

1) Install the etherpad-lite as according to the procedure at README.md:

https://github.com/ether/etherpad-lite

2) In your config.js, edit etherpad_base as:

etherpad_base: 'https://etherpad.“your domain”:9001/p/‘

replace “your domain” with your server domain name

3) to autostart your etherpad-lite when system boot, create "/etc/init.d/etherpad-lite” with following script:
#!/bin/sh
### BEGIN INIT INFO
# Provides: etherpad-lite
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts etherpad lite
# Description: starts etherpad lite using start-stop-daemon
### END INIT INFO

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/node"
LOGFILE="/var/log/etherpad-lite/etherpad-lite.log" #change this value with log directory you have creted.
EPLITE_DIR="/root/etherpad-lite" #Path of etherpad installtion
EPLITE_BIN="bin/safeRun.sh"
USER="root" # change username with your system username.
GROUP="root" #change Group value.
DESC="Etherpad Lite"
NAME="etherpad-lite"

set -e

. /lib/lsb/init-functions

start() {
  echo "Starting $DESC... "

    start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
  echo "done"
}
#We need this function to ensure the whole process tree will be killed
killtree() {
    local _pid=$1
    local _sig=${2-TERM}
    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
        killtree ${_child} ${_sig}
    done
    kill -${_sig} ${_pid}
}
stop() {
  echo "Stopping $DESC... "
  if test -f /var/run/$NAME.pid; then
    while test -d /proc/$(cat /var/run/$NAME.pid); do
      killtree $(cat /var/run/$NAME.pid) 15
      sleep 0.5
    done
    rm /var/run/$NAME.pid
  fi
  echo "done"
}
status() {
  status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
}
case "$1" in
  start)
      start
      ;;
  stop)
    stop
      ;;
  restart)
      stop
      start
      ;;
  status)
      status
      ;;
  *)
      echo "Usage: $NAME {start|stop|restart|status}" >&2
      exit 1
      ;;
esac
exit 0

4) run following command to finalise the startup:
chmod +x /etc/init.d/etherpad-lite
ln -s /“home dir"/etherpad-lite /usr/share/etherpad-lite ! replace “home dir” with your installation direction
mkdir /var/log/etherpad-lite
touch /var/log/etherpad-lite/etherpad-lite.log
update-rc.d etherpad-lite defaults

5) start the etherpad-lite
/etc/init.d/etherpad-lite start


#2

I got etherpad-lite running. (I can browse domain:9001)

I modified the config.js to the etherpad_base: 'https://domain.url.here:9001/p/
                                                 And desktopSharing: 'ext'
But when clicking the screen sharing in the Jitsi meet session nothing happens, at all.

Second issue, the autostart does not keep running. It says starting > done. But then a follow up "status" command shows it not running.

Thanks for the help!

Phillip Kenney

···

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of Kin Sang Lau
Sent: Thursday, July 17, 2014 11:00 PM
To: dev@jitsi.org
Subject: [jitsi-dev] Etherpad

1) Install the etherpad-lite as according to the procedure at README.md:

https://github.com/ether/etherpad-lite

2) In your config.js, edit etherpad_base as:

etherpad_base: ‘https://etherpad.“your domain”:9001/p/’

replace "your domain" with your server domain name

3) to autostart your etherpad-lite when system boot, create "/etc/init.d/etherpad-lite" with following script:
#!/bin/sh
### BEGIN INIT INFO
# Provides: etherpad-lite
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts etherpad lite
# Description: starts etherpad lite using start-stop-daemon
### END INIT INFO

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/node"
LOGFILE="/var/log/etherpad-lite/etherpad-lite.log" #change this value with log directory you have creted.
EPLITE_DIR="/root/etherpad-lite" #Path of etherpad installtion EPLITE_BIN="bin/safeRun.sh"
USER="root" # change username with your system username.
GROUP="root" #change Group value.
DESC="Etherpad Lite"
NAME="etherpad-lite"

set -e

. /lib/lsb/init-functions

start() {
  echo "Starting $DESC... "

    start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
  echo "done"
}
#We need this function to ensure the whole process tree will be killed
killtree() {
    local _pid=$1
    local _sig=${2-TERM}
    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
        killtree ${_child} ${_sig}
    done
    kill -${_sig} ${_pid}
}
stop() {
  echo "Stopping $DESC... "
  if test -f /var/run/$NAME.pid; then
    while test -d /proc/$(cat /var/run/$NAME.pid); do
      killtree $(cat /var/run/$NAME.pid) 15
      sleep 0.5
    done
    rm /var/run/$NAME.pid
  fi
  echo "done"
}
status() {
  status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
}
case "$1" in
  start)
      start
      ;;
  stop)
    stop
      ;;
  restart)
      stop
      start
      ;;
  status)
      status
      ;;
  *)
      echo "Usage: $NAME {start|stop|restart|status}" >&2
      exit 1
      ;;
esac
exit 0

4) run following command to finalise the startup:
chmod +x /etc/init.d/etherpad-lite
ln -s /"home dir"/etherpad-lite /usr/share/etherpad-lite ! replace "home dir" with your installation direction
mkdir /var/log/etherpad-lite
touch /var/log/etherpad-lite/etherpad-lite.log
update-rc.d etherpad-lite defaults

5) start the etherpad-lite
/etc/init.d/etherpad-lite start
_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#3

Sorry, I mixed goals.... and questions.

The only issue I'm having with this is the autostart.

Phillip Kenney

···

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of Phillip Kenney
Sent: Friday, July 18, 2014 9:08 AM
To: 'Jitsi Developers'
Subject: Re: [jitsi-dev] Etherpad

I got etherpad-lite running. (I can browse domain:9001)

I modified the config.js to the etherpad_base: 'https://domain.url.here:9001/p/
                                                 And desktopSharing: 'ext'
But when clicking the screen sharing in the Jitsi meet session nothing happens, at all.

Second issue, the autostart does not keep running. It says starting > done. But then a follow up "status" command shows it not running.

Thanks for the help!

Phillip Kenney

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of Kin Sang Lau
Sent: Thursday, July 17, 2014 11:00 PM
To: dev@jitsi.org
Subject: [jitsi-dev] Etherpad

1) Install the etherpad-lite as according to the procedure at README.md:

https://github.com/ether/etherpad-lite

2) In your config.js, edit etherpad_base as:

etherpad_base: ‘https://etherpad.“your domain”:9001/p/’

replace "your domain" with your server domain name

3) to autostart your etherpad-lite when system boot, create "/etc/init.d/etherpad-lite" with following script:
#!/bin/sh
### BEGIN INIT INFO
# Provides: etherpad-lite
# Required-Start: $local_fs $remote_fs $network $syslog
# Required-Stop: $local_fs $remote_fs $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts etherpad lite
# Description: starts etherpad lite using start-stop-daemon
### END INIT INFO

PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/bin/node"
LOGFILE="/var/log/etherpad-lite/etherpad-lite.log" #change this value with log directory you have creted.
EPLITE_DIR="/root/etherpad-lite" #Path of etherpad installtion EPLITE_BIN="bin/safeRun.sh"
USER="root" # change username with your system username.
GROUP="root" #change Group value.
DESC="Etherpad Lite"
NAME="etherpad-lite"

set -e

. /lib/lsb/init-functions

start() {
  echo "Starting $DESC... "

    start-stop-daemon --start --chuid "$USER:$GROUP" --background --make-pidfile --pidfile /var/run/$NAME.pid --exec $EPLITE_DIR/$EPLITE_BIN -- $LOGFILE || true
  echo "done"
}
#We need this function to ensure the whole process tree will be killed
killtree() {
    local _pid=$1
    local _sig=${2-TERM}
    for _child in $(ps -o pid --no-headers --ppid ${_pid}); do
        killtree ${_child} ${_sig}
    done
    kill -${_sig} ${_pid}
}
stop() {
  echo "Stopping $DESC... "
  if test -f /var/run/$NAME.pid; then
    while test -d /proc/$(cat /var/run/$NAME.pid); do
      killtree $(cat /var/run/$NAME.pid) 15
      sleep 0.5
    done
    rm /var/run/$NAME.pid
  fi
  echo "done"
}
status() {
  status_of_proc -p /var/run/$NAME.pid "" "etherpad-lite" && exit 0 || exit $?
}
case "$1" in
  start)
      start
      ;;
  stop)
    stop
      ;;
  restart)
      stop
      start
      ;;
  status)
      status
      ;;
  *)
      echo "Usage: $NAME {start|stop|restart|status}" >&2
      exit 1
      ;;
esac
exit 0

4) run following command to finalise the startup:
chmod +x /etc/init.d/etherpad-lite
ln -s /"home dir"/etherpad-lite /usr/share/etherpad-lite ! replace "home dir" with your installation direction
mkdir /var/log/etherpad-lite
touch /var/log/etherpad-lite/etherpad-lite.log
update-rc.d etherpad-lite defaults

5) start the etherpad-lite
/etc/init.d/etherpad-lite start
_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#4

Check the log as specified in LOGFILE var in the init script.
It should say what is wrong.

···

On Fri, 18 Jul 2014 13:12:45 +0000 Phillip Kenney wrote:

The only issue I'm having with this is the autostart.

--
Yasen Pramatarov
sysadmin, https://jitsi.org


#5

Log file is there, but blank.

Phillip Kenney

···

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of Yasen Pramatarov
Sent: Friday, July 18, 2014 9:19 AM
To: dev@jitsi.org
Subject: Re: [jitsi-dev] Etherpad

On Fri, 18 Jul 2014 13:12:45 +0000 Phillip Kenney wrote:

The only issue I'm having with this is the autostart.

Check the log as specified in LOGFILE var in the init script.
It should say what is wrong.

--
Yasen Pramatarov
sysadmin, https://jitsi.org

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev


#6

Start the etherpad by hand, for instance if the user is 'etherpad'
with:

su -c '<path-to-etherpad>/bin/run.sh <logfile-name>' etherpad

And check what is in the <logfile-name>

Also bear in mind that in the email with the example init script in
this thread the lines may get wrapped and this could be the problem.

https://help.ubuntu.com/community/Etherpad-liteInstallation
http://www.rosehosting.com/blog/install-etherpad-lite-on-debian-wheezy/

···

On Fri, 18 Jul 2014 13:22:19 +0000 Phillip Kenney wrote:

Log file is there, but blank.

--
Yasen Pramatarov
sysadmin, https://jitsi.org


#7

That pointed me to some permissions issues. It's working great now.

Thanks for the help!

Phillip Kenney

···

-----Original Message-----
From: dev-bounces@jitsi.org [mailto:dev-bounces@jitsi.org] On Behalf Of Yasen Pramatarov
Sent: Friday, July 18, 2014 9:34 AM
To: dev@jitsi.org
Subject: Re: [jitsi-dev] Etherpad

On Fri, 18 Jul 2014 13:22:19 +0000 Phillip Kenney wrote:

Log file is there, but blank.

Start the etherpad by hand, for instance if the user is 'etherpad'
with:

su -c '<path-to-etherpad>/bin/run.sh <logfile-name>' etherpad

And check what is in the <logfile-name>

Also bear in mind that in the email with the example init script in this thread the lines may get wrapped and this could be the problem.

https://help.ubuntu.com/community/Etherpad-liteInstallation
http://www.rosehosting.com/blog/install-etherpad-lite-on-debian-wheezy/

--
Yasen Pramatarov
sysadmin, https://jitsi.org

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev