From 8da0d3a1f1d68d1718fcb395bc0340c2a7eba39c Mon Sep 17 00:00:00 2001 From: damencho Date: Mon, 21 Nov 2016 15:16:37 -0600 Subject: [PATCH] Removes dependencies to other components. Now the web app can be installed separately from jicofo and jitsi-videobridge, or can be installed on machine running nginx or apache. Currently only nginx will be configured and apache config is left to user. Later we can add and the apache config. Renames jitsi-meet to jitsi-meet-web (just the web content) and jitsi-meet-web-config (configuring jetty, nginx or apache). A new jitsi-meet package will be introduced, a meta package depending on jicofo, jvb and the current packages. --- debian/control | 26 +++- debian/jitsi-meet-prosody.config | 4 - debian/jitsi-meet-prosody.postinst | 62 +++++++--- debian/jitsi-meet-prosody.postrm | 3 + debian/jitsi-meet-prosody.templates | 26 ++++ debian/jitsi-meet-tokens.postinst | 17 +-- debian/jitsi-meet-tokens.postrm | 2 + ...et.config => jitsi-meet-web-config.config} | 0 ...i-meet.dirs => jitsi-meet-web-config.dirs} | 0 ...ostinst => jitsi-meet-web-config.postinst} | 112 ++++++++++-------- ...et.postrm => jitsi-meet-web-config.postrm} | 6 +- ...plates => jitsi-meet-web-config.templates} | 5 + ...ME.Debian => jitsi-meet-web.README.Debian} | 0 .../{jitsi-meet.docs => jitsi-meet-web.docs} | 0 ...si-meet.install => jitsi-meet-web.install} | 0 debian/po/POTFILES.in | 2 +- debian/po/templates.pot | 53 ++++++--- doc/debian/jitsi-meet/jitsi-meet.example | 4 +- 18 files changed, 215 insertions(+), 107 deletions(-) delete mode 100644 debian/jitsi-meet-prosody.config rename debian/{jitsi-meet.config => jitsi-meet-web-config.config} (100%) rename debian/{jitsi-meet.dirs => jitsi-meet-web-config.dirs} (100%) rename debian/{jitsi-meet.postinst => jitsi-meet-web-config.postinst} (68%) rename debian/{jitsi-meet.postrm => jitsi-meet-web-config.postrm} (88%) rename debian/{jitsi-meet.templates => jitsi-meet-web-config.templates} (89%) rename debian/{jitsi-meet.README.Debian => jitsi-meet-web.README.Debian} (100%) rename debian/{jitsi-meet.docs => jitsi-meet-web.docs} (100%) rename debian/{jitsi-meet.install => jitsi-meet-web.install} (100%) diff --git a/debian/control b/debian/control index bb39000d6..a20bfa29d 100644 --- a/debian/control +++ b/debian/control @@ -1,4 +1,4 @@ -Source: jitsi-meet +Source: jitsi-meet-web Section: net Priority: extra Maintainer: Jitsi Team @@ -7,10 +7,10 @@ Build-Depends: debhelper (>= 8.0.0) Standards-Version: 3.9.6 Homepage: https://jitsi.org/meet -Package: jitsi-meet +Package: jitsi-meet-web +Replaces: jitsi-meet (<= 1.0.1525-1) Architecture: all -Depends: ${misc:Depends}, jitsi-videobridge, jitsi-meet-prosody, - openjdk-8-jre-headless | nginx +Depends: ${misc:Depends} Description: WebRTC JavaScript video conferences Jitsi Meet is a WebRTC JavaScript application that uses Jitsi Videobridge to provide high quality, scalable video conferences. @@ -19,9 +19,25 @@ Description: WebRTC JavaScript video conferences forwarding and relaying, configured to work with jetty instance running embedded into Jitsi Videobridge +Package: jitsi-meet-web-config +Architecture: all +Depends: openssl, openjdk-8-jre-headless | nginx | apache2, + jitsi-meet-web +Description: Configuration for web serving of Jitsi Meet + Jitsi Meet is a WebRTC JavaScript application that uses Jitsi + Videobridge to provide high quality, scalable video conferences. + . + It is a web interface to Jitsi Videobridge for audio and video + forwarding and relaying, configured to work with jetty instance + running embedded into Jitsi Videobridge or using a webserver Nginx or + Apache2. + . + This package contains configuration for Nginx to be used with + Jitsi Meet. + Package: jitsi-meet-prosody Architecture: all -Depends: ${misc:Depends}, openssl, prosody | prosody-trunk, jitsi-videobridge, jicofo +Depends: openssl, prosody | prosody-trunk, jitsi-meet-web Description: Prosody configuration for Jitsi Meet Jitsi Meet is a WebRTC JavaScript application that uses Jitsi Videobridge to provide high quality, scalable video conferences. diff --git a/debian/jitsi-meet-prosody.config b/debian/jitsi-meet-prosody.config deleted file mode 100644 index f5601b0a5..000000000 --- a/debian/jitsi-meet-prosody.config +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -e - -# Source debconf library. -. /usr/share/debconf/confmodule diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst index aabd71b98..13d9582f6 100644 --- a/debian/jitsi-meet-prosody.postinst +++ b/debian/jitsi-meet-prosody.postinst @@ -21,13 +21,49 @@ set -e case "$1" in configure) - . /etc/jitsi/videobridge/config - - . /etc/jitsi/jicofo/config - # loading debconf . /usr/share/debconf/confmodule + # try to get host from jitsi-videobridge + db_get jitsi-videobridge/jvb-hostname + if [ -z "$RET" ] ; then + # server hostname + db_set jitsi-videobridge/jvb-hostname "localhost" + db_input critical jitsi-videobridge/jvb-hostname || true + db_go + fi + JVB_HOSTNAME="$RET" + + db_get jitsi-videobridge/jvbsecret + if [ -z "$RET" ] ; then + db_input critical jitsi-videobridge/jvbsecret || true + db_go + fi + JVB_SECRET="$RET" + + db_get jicofo/jicofo-authuser + if [ -z "$RET" ] ; then + db_input critical jicofo/jicofo-authuser || true + db_go + fi + JICOFO_AUTH_USER="$RET" + + db_get jicofo/jicofo-authpassword + if [ -z "$RET" ] ; then + db_input critical jicofo/jicofo-authpassword || true + db_go + fi + JICOFO_AUTH_PASSWORD="$RET" + + db_get jicofo/jicofosecret + if [ -z "$RET" ] ; then + db_input critical jicofo/jicofosecret || true + db_go + fi + JICOFO_SECRET="$RET" + + JICOFO_AUTH_DOMAIN="auth.$JVB_HOSTNAME" + # detect dpkg-reconfigure, just delete old links db_get jitsi-meet-prosody/jvb-hostname JVB_HOSTNAME_OLD=$RET @@ -38,7 +74,7 @@ case "$1" in fi # stores the hostname so we will reuse it later, like in purge - db_set jitsi-meet-prosody/jvb-hostname $JVB_HOSTNAME + db_set jitsi-meet-prosody/jvb-hostname "$JVB_HOSTNAME" # and we're done with debconf db_stop @@ -68,21 +104,21 @@ case "$1" in fi fi # UPGRADE to server side focus check if focus is configured - if [ -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"auth.$JVB_HOSTNAME\"" $PROSODY_HOST_CONFIG; then - echo -e "\nVirtualHost \"auth.$JVB_HOSTNAME\"" >> $PROSODY_HOST_CONFIG + if [ -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"$JICOFO_AUTH_DOMAIN\"" $PROSODY_HOST_CONFIG; then + echo -e "\nVirtualHost \"$JICOFO_AUTH_DOMAIN\"" >> $PROSODY_HOST_CONFIG echo -e " authentication = \"internal_plain\"\n" >> $PROSODY_HOST_CONFIG - sed -i "s/Component \"conference.$JVB_HOSTNAME\" \"muc\"/Component \"conference.$JVB_HOSTNAME\" \"muc\"\nadmins = { \"$JICOFO_AUTH_USER@auth.$JVB_HOSTNAME\" }\n/g" $PROSODY_HOST_CONFIG + sed -i "s/Component \"conference.$JVB_HOSTNAME\" \"muc\"/Component \"conference.$JVB_HOSTNAME\" \"muc\"\nadmins = { \"$JICOFO_AUTH_USER@$JICOFO_AUTH_DOMAIN\" }\n/g" $PROSODY_HOST_CONFIG echo -e "Component \"focus.$JVB_HOSTNAME\"" >> $PROSODY_HOST_CONFIG echo -e " component_secret=\"$JICOFO_SECRET\"\n" >> $PROSODY_HOST_CONFIG PROSODY_CREATE_JICOFO_USER="true" # UPGRADE to server side focus on old config(/etc/prosody/prosody.cfg.lua) - elif [ ! -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"auth.$JVB_HOSTNAME\"" $PROSODY_CONFIG_OLD; then - echo -e "\nVirtualHost \"auth.$JVB_HOSTNAME\"" >> $PROSODY_CONFIG_OLD + elif [ ! -f $PROSODY_HOST_CONFIG ] && ! grep -q "VirtualHost \"$JICOFO_AUTH_DOMAIN\"" $PROSODY_CONFIG_OLD; then + echo -e "\nVirtualHost \"$JICOFO_AUTH_DOMAIN\"" >> $PROSODY_CONFIG_OLD echo -e " authentication = \"internal_plain\"\n" >> $PROSODY_CONFIG_OLD if ! grep -q "admins = { }" $PROSODY_CONFIG_OLD; then - echo -e "admins = { \"$JICOFO_AUTH_USER@auth.$JVB_HOSTNAME\" }\n" >> $PROSODY_CONFIG_OLD + echo -e "admins = { \"$JICOFO_AUTH_USER@$JICOFO_AUTH_DOMAIN\" }\n" >> $PROSODY_CONFIG_OLD else - sed -i "s/admins = { }/admins = { \"$JICOFO_AUTH_USER@auth.$JVB_HOSTNAME\" }\n/g" $PROSODY_CONFIG_OLD + sed -i "s/admins = { }/admins = { \"$JICOFO_AUTH_USER@$JICOFO_AUTH_DOMAIN\" }\n/g" $PROSODY_CONFIG_OLD fi echo -e "Component \"focus.$JVB_HOSTNAME\"" >> $PROSODY_CONFIG_OLD echo -e " component_secret=\"$JICOFO_SECRET\"\n" >> $PROSODY_CONFIG_OLD @@ -109,8 +145,6 @@ case "$1" in if [ "$PROSODY_CONFIG_PRESENT" = "false" ]; then invoke-rc.d prosody restart - invoke-rc.d jitsi-videobridge restart - invoke-rc.d jicofo restart fi ;; diff --git a/debian/jitsi-meet-prosody.postrm b/debian/jitsi-meet-prosody.postrm index 9d21befcf..89a1ff87b 100644 --- a/debian/jitsi-meet-prosody.postrm +++ b/debian/jitsi-meet-prosody.postrm @@ -36,6 +36,9 @@ case "$1" in rm -f /etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua rm -f /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua fi + + # Clear the debconf variable + db_purge ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) diff --git a/debian/jitsi-meet-prosody.templates b/debian/jitsi-meet-prosody.templates index 970ebd2c9..18d634b30 100644 --- a/debian/jitsi-meet-prosody.templates +++ b/debian/jitsi-meet-prosody.templates @@ -2,3 +2,29 @@ Template: jitsi-meet-prosody/jvb-hostname Type: string _Description: The hostname of the current installation: The value for the hostname that is set in Jitsi Videobridge installation. + +Template: jitsi-videobridge/jvb-hostname +Type: string +_Description: The hostname of the current installation: + The value for the hostname that is set in Jitsi Videobridge installation. + +Template: jitsi-videobridge/jvbsecret +Type: password +_Description: Jitsi Videobridge Component secret: + The secret used by Jitsi Videobridge to connect to xmpp server as component. + +Template: jicofo/jicofo-authuser +Type: string +Default: focus +_Description: Jicofo username: + The jicofo needs an authenticated admin user to connect to xmpp server. + +Template: jicofo/jicofo-authpassword +Type: password +_Description: Jicofo user password: + The secret used to connect to xmpp server as jicofo user. + +Template: jicofo/jicofosecret +Type: password +_Description: Jicofo Component secret: + The secret used to connect to xmpp server as component diff --git a/debian/jitsi-meet-tokens.postinst b/debian/jitsi-meet-tokens.postinst index fc26331a8..47cea831d 100644 --- a/debian/jitsi-meet-tokens.postinst +++ b/debian/jitsi-meet-tokens.postinst @@ -21,17 +21,12 @@ set -e case "$1" in configure) - if [ -f "/etc/jitsi/videobridge/config" ] ; then - . /etc/jitsi/videobridge/config - fi - - if [ -f "/etc/jitsi/jicofo/config" ] ; then - . /etc/jitsi/jicofo/config - fi - # loading debconf . /usr/share/debconf/confmodule + db_get jitsi-meet-prosody/jvb-hostname + JVB_HOSTNAME="$RET" + db_get jitsi-meet-tokens/appid if [ "$RET" = "false" ] ; then echo "Application ID is mandatory" @@ -45,14 +40,10 @@ case "$1" in fi APP_SECRET=$RET - # We can adjust Prosody config only if there is Jvb or Jicofo domain configured PROSODY_HOST_CONFIG="/etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua" - if [ ! -f "$PROSODY_HOST_CONFIG" ] ; then - PROSODY_HOST_CONFIG="/etc/prosody/conf.avail/$JICOFO_HOSTNAME.cfg.lua" - fi # Store config filename for purge - db_set jitsi-meet-prosody/prosody_config $PROSODY_HOST_CONFIG + db_set jitsi-meet-prosody/prosody_config "$PROSODY_HOST_CONFIG" db_stop diff --git a/debian/jitsi-meet-tokens.postrm b/debian/jitsi-meet-tokens.postrm index b57fe1ee7..264ad2a2b 100644 --- a/debian/jitsi-meet-tokens.postrm +++ b/debian/jitsi-meet-tokens.postrm @@ -52,6 +52,8 @@ case "$1" in ;; purge) + # Clear the debconf variable + db_purge ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) diff --git a/debian/jitsi-meet.config b/debian/jitsi-meet-web-config.config similarity index 100% rename from debian/jitsi-meet.config rename to debian/jitsi-meet-web-config.config diff --git a/debian/jitsi-meet.dirs b/debian/jitsi-meet-web-config.dirs similarity index 100% rename from debian/jitsi-meet.dirs rename to debian/jitsi-meet-web-config.dirs diff --git a/debian/jitsi-meet.postinst b/debian/jitsi-meet-web-config.postinst similarity index 68% rename from debian/jitsi-meet.postinst rename to debian/jitsi-meet-web-config.postinst index b538fd1a2..13b0c9973 100644 --- a/debian/jitsi-meet.postinst +++ b/debian/jitsi-meet-web-config.postinst @@ -1,5 +1,5 @@ #!/bin/bash -# postinst script for jitsi-meet +# postinst script for jitsi-meet-web-config # # see: dh_installdeb(1) @@ -20,13 +20,19 @@ set -e case "$1" in configure) - JVB_ETC_CONFIG="/etc/jitsi/videobridge/config" - - . $JVB_ETC_CONFIG - # loading debconf . /usr/share/debconf/confmodule + # try to get host from jitsi-videobridge + db_get jitsi-videobridge/jvb-hostname + if [ -z "$RET" ] ; then + # server hostname + db_set jitsi-videobridge/jvb-hostname "localhost" + db_input critical jitsi-videobridge/jvb-hostname || true + db_go + fi + JVB_HOSTNAME="$RET" + # detect dpkg-reconfigure RECONFIGURING="false" db_get jitsi-meet/jvb-hostname @@ -49,22 +55,54 @@ case "$1" in if [ "$NGINX_INSTALL_CHECK" = "installed" ] || [ "$NGINX_INSTALL_CHECK" = "unpacked" ] ; then FORCE_NGINX="true" fi + APACHE_INSTALL_CHECK="$(dpkg-query -f '${Status}' -W 'apache2' 2>/dev/null | awk '{print $3}' || true)" + if [ "$APACHE_INSTALL_CHECK" = "installed" ] || [ "$APACHE_INSTALL_CHECK" = "unpacked" ] ; then + FORCE_APACHE="true" + fi - # SSL for nginx - db_get jitsi-meet/cert-choice - CERT_CHOICE="$RET" - UPLOADED_CERT_CHOICE="A certificate is available and the files are uploaded on the server" + # if first time config ask for certs, or if we are reconfiguring + if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then + # SSL for nginx + db_get jitsi-meet/cert-choice + CERT_CHOICE="$RET" + UPLOADED_CERT_CHOICE="A certificate is available and the files are uploaded on the server" + + if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then + db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key" + db_input critical jitsi-meet/cert-path-key || true + db_go + db_get jitsi-meet/cert-path-key + CERT_KEY="$RET" + db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt" + db_input critical jitsi-meet/cert-path-crt || true + db_go + db_get jitsi-meet/cert-path-crt + CERT_CRT="$RET" + else + # create self-signed certs + CERT_KEY="/etc/jitsi/meet/$JVB_HOSTNAME.key" + CERT_CRT="/etc/jitsi/meet/$JVB_HOSTNAME.crt" + HOST="$( (hostname -s; echo localhost) | head -n 1)" + DOMAIN="$( (hostname -d; echo localdomain) | head -n 1)" + openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj \ + "/O=$DOMAIN/OU=$HOST/CN=$JVB_HOSTNAME/emailAddress=webmaster@$HOST.$DOMAIN" \ + -keyout $CERT_KEY \ + -out $CERT_CRT + fi + fi # jitsi meet JITSI_MEET_CONFIG="/etc/jitsi/meet/$JVB_HOSTNAME-config.js" if [ ! -f $JITSI_MEET_CONFIG ] ; then - cp /usr/share/doc/jitsi-meet/config.js $JITSI_MEET_CONFIG + cp /usr/share/doc/jitsi-meet-web/config.js $JITSI_MEET_CONFIG sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG fi # this is new install let's configure jvb to serve meet - if [[ -z $FORCE_NGINX && ( -z $JVB_HOSTNAME_OLD || "$JVB_SERVE" = "true" ) ]] ; then + # no-nginx, no-apache installed on machine, this is new install or reconfiguring old one which have jvb_serve set + if [[ -z "$FORCE_NGINX" && -z "$FORCE_APACHE" && ( -z "$JVB_HOSTNAME_OLD" || ( "$JVB_SERVE" = "true" && "$RECONFIGURING" = "true" )) ]] ; then + JVB_ETC_CONFIG="/etc/jitsi/videobridge/config" JVB_CONFIG="/etc/jitsi/videobridge/sip-communicator.properties" # this is a reconfigure, lets just delete old links @@ -112,34 +150,19 @@ case "$1" in chmod 755 /etc/authbind/byport/443 fi - if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then - # create jks from uploaded certs - openssl pkcs12 -export \ - -in /etc/ssl/$JVB_HOSTNAME.crt \ - -inkey /etc/ssl/$JVB_HOSTNAME.key \ - -passout pass:changeit > /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 - keytool -importkeystore \ - -srckeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 \ - -destkeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.jks \ - -srcstoretype pkcs12 \ - -noprompt -storepass changeit -srcstorepass changeit - else - # create jks from self-signed certs - openssl pkcs12 -export \ - -in /var/lib/prosody/$JVB_HOSTNAME.crt \ - -inkey /var/lib/prosody/$JVB_HOSTNAME.key \ - -passout pass:changeit > /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 - keytool -importkeystore \ - -srckeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 \ - -destkeystore /etc/jitsi/videobridge/$JVB_HOSTNAME.jks \ - -srcstoretype pkcs12 \ - -noprompt -storepass changeit -srcstorepass changeit - fi + CERT_P12="/etc/jitsi/videobridge/$JVB_HOSTNAME.p12" + CERT_JKS="/etc/jitsi/videobridge/$JVB_HOSTNAME.jks" + # create jks from certs + openssl pkcs12 -export \ + -in $CERT_CRT -inkey $CERT_KEY -passout pass:changeit > $CERT_P12 + keytool -importkeystore -destkeystore $CERT_JKS \ + -srckeystore $CERT_P12 -srcstoretype pkcs12 \ + -noprompt -storepass changeit -srcstorepass changeit db_set jitsi-meet/jvb-serve "true" invoke-rc.d jitsi-videobridge restart - elif [[ "$FORCE_NGINX" = "true" || ( -n $JVB_HOSTNAME_OLD && "$JVB_SERVE" = "false" ) ]] ; then + elif [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then # this is a reconfigure, lets just delete old links if [ "$RECONFIGURING" = "true" ] ; then rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME_OLD.conf @@ -148,7 +171,7 @@ case "$1" in # nginx conf if [ ! -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf ] ; then - cp /usr/share/doc/jitsi-meet/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf + cp /usr/share/doc/jitsi-meet-web/jitsi-meet.example /etc/nginx/sites-available/$JVB_HOSTNAME.conf if [ ! -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf ] ; then ln -s /etc/nginx/sites-available/$JVB_HOSTNAME.conf /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf fi @@ -156,28 +179,21 @@ case "$1" in fi if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then - db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key" - db_input critical jitsi-meet/cert-path-key || true - db_go - db_get jitsi-meet/cert-path-key - CERT_KEY="$RET" - db_set jitsi-meet/cert-path-crt "/etc/ssl/$JVB_HOSTNAME.crt" - db_input critical jitsi-meet/cert-path-crt || true - db_go - db_get jitsi-meet/cert-path-crt - CERT_CRT="$RET" # replace self-signed certificate paths with user provided ones CERT_KEY_ESC=$(echo $CERT_KEY | sed 's/\./\\\./g') CERT_KEY_ESC=$(echo $CERT_KEY_ESC | sed 's/\//\\\//g') - sed -i "s/ssl_certificate_key\ \/var\/lib\/prosody\/.*key/ssl_certificate_key\ $CERT_KEY_ESC/g" \ + sed -i "s/ssl_certificate_key\ \/etc\/jitsi\/meet\/.*key/ssl_certificate_key\ $CERT_KEY_ESC/g" \ /etc/nginx/sites-available/$JVB_HOSTNAME.conf CERT_CRT_ESC=$(echo $CERT_CRT | sed 's/\./\\\./g') CERT_CRT_ESC=$(echo $CERT_CRT_ESC | sed 's/\//\\\//g') - sed -i "s/ssl_certificate\ \/var\/lib\/prosody\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \ + sed -i "s/ssl_certificate\ \/etc\/jitsi\/meet\/.*crt/ssl_certificate\ $CERT_CRT_ESC/g" \ /etc/nginx/sites-available/$JVB_HOSTNAME.conf fi invoke-rc.d nginx reload + elif [[ "$FORCE_APACHE" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then + echo "Apache2 server is installed, automatic configuration is not supported at this time." + echo "You need to configure yourselve the virtual host for your domain." fi # and we're done with debconf diff --git a/debian/jitsi-meet.postrm b/debian/jitsi-meet-web-config.postrm similarity index 88% rename from debian/jitsi-meet.postrm rename to debian/jitsi-meet-web-config.postrm index 807dc38cb..f09d83916 100644 --- a/debian/jitsi-meet.postrm +++ b/debian/jitsi-meet-web-config.postrm @@ -1,5 +1,5 @@ #!/bin/sh -# postrm script for jitsi-meet +# postrm script for jitsi-meet-web-config # # see: dh_installdeb(1) @@ -37,7 +37,11 @@ case "$1" in rm -f /etc/nginx/sites-enabled/$JVB_HOSTNAME.conf rm -f /etc/jitsi/videobridge/$JVB_HOSTNAME.jks rm -f /etc/jitsi/videobridge/$JVB_HOSTNAME.p12 + rm -f /etc/jitsi/meet/$JVB_HOSTNAME.key + rm -f /etc/jitsi/meet/$JVB_HOSTNAME.crt fi + # Clear the debconf variable + db_purge ;; upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; diff --git a/debian/jitsi-meet.templates b/debian/jitsi-meet-web-config.templates similarity index 89% rename from debian/jitsi-meet.templates rename to debian/jitsi-meet-web-config.templates index 32050feef..577b7606d 100644 --- a/debian/jitsi-meet.templates +++ b/debian/jitsi-meet-web-config.templates @@ -30,3 +30,8 @@ Type: boolean Default: false _Description: for internal use for internal use. + +Template: jitsi-videobridge/jvb-hostname +Type: string +_Description: Hostname: + The Jitsi Meet web config package needs the DNS hostname of your instance. diff --git a/debian/jitsi-meet.README.Debian b/debian/jitsi-meet-web.README.Debian similarity index 100% rename from debian/jitsi-meet.README.Debian rename to debian/jitsi-meet-web.README.Debian diff --git a/debian/jitsi-meet.docs b/debian/jitsi-meet-web.docs similarity index 100% rename from debian/jitsi-meet.docs rename to debian/jitsi-meet-web.docs diff --git a/debian/jitsi-meet.install b/debian/jitsi-meet-web.install similarity index 100% rename from debian/jitsi-meet.install rename to debian/jitsi-meet-web.install diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in index 3458b92cf..6ddfac361 100644 --- a/debian/po/POTFILES.in +++ b/debian/po/POTFILES.in @@ -1 +1 @@ -[type: gettext/rfc822deb] jitsi-meet.templates +[type: gettext/rfc822deb] jitsi-meet-web-config.templates diff --git a/debian/po/templates.pot b/debian/po/templates.pot index d3933e730..4d5c2e2e6 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -1,10 +1,14 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the jitsi-meet-web package. +# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: jitsi-meet\n" -"Report-Msgid-Bugs-To: jitsi-meet@packages.debian.org\n" -"POT-Creation-Date: 2014-09-03 17:26+0200\n" +"Project-Id-Version: jitsi-meet-web\n" +"Report-Msgid-Bugs-To: jitsi-meet-web@packages.debian.org\n" +"POT-Creation-Date: 2016-11-15 22:39+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -15,25 +19,25 @@ msgstr "" #. Type: select #. Choices -#: ../jitsi-meet.templates:1001 +#: ../jitsi-meet-web-config.templates:1001 msgid "Self-signed certificate will be generated" msgstr "" #. Type: select #. Choices -#: ../jitsi-meet.templates:1001 +#: ../jitsi-meet-web-config.templates:1001 msgid "A certificate is available and the files are uploaded on the server" msgstr "" #. Type: select #. Description -#: ../jitsi-meet.templates:1002 +#: ../jitsi-meet-web-config.templates:1002 msgid "SSL certificate for the Jitsi Meet instance" msgstr "" #. Type: select #. Description -#: ../jitsi-meet.templates:1002 +#: ../jitsi-meet-web-config.templates:1002 msgid "" "Jitsi Meet is best to be set up with an SSL certificate. Having no " "certificate, a self-signed one will be generated. Having a certificate " @@ -44,13 +48,13 @@ msgstr "" #. Type: string #. Description -#: ../jitsi-meet.templates:2001 +#: ../jitsi-meet-web-config.templates:2001 msgid "Full local server path to the SSL key file:" msgstr "" #. Type: string #. Description -#: ../jitsi-meet.templates:2001 +#: ../jitsi-meet-web-config.templates:2001 msgid "" "The full path to the SSL key file on the server. If it has not been " "uploaded, now is a good time to do so." @@ -58,13 +62,13 @@ msgstr "" #. Type: string #. Description -#: ../jitsi-meet.templates:3001 +#: ../jitsi-meet-web-config.templates:3001 msgid "Full local server path to the SSL certificate file:" msgstr "" #. Type: string #. Description -#: ../jitsi-meet.templates:3001 +#: ../jitsi-meet-web-config.templates:3001 msgid "" "The full path to the SSL certificate file on the server. If you haven't " "uploaded it, now is a good time to upload it in another console." @@ -72,27 +76,38 @@ msgstr "" #. Type: string #. Description -#: ../jitsi-meet.templates:4001 +#: ../jitsi-meet-web-config.templates:4001 msgid "The hostname of the current installation:" msgstr "" #. Type: string #. Description -#: ../jitsi-meet.templates:4001 +#: ../jitsi-meet-web-config.templates:4001 msgid "" "The value for the hostname that is set in Jitsi Videobridge installation." msgstr "" - -#. Type: string +#. Type: boolean #. Description -#: ../jitsi-meet.templates:5001 +#: ../jitsi-meet-web-config.templates:5001 msgid "for internal use" msgstr "" +#. Type: boolean +#. Description +#: ../jitsi-meet-web-config.templates:5001 +msgid "for internal use." +msgstr "" + #. Type: string #. Description -#: ../jitsi-meet.templates:5001 -msgid "" -"Jitsi Videobridge installation can use its internal jetty to serve static meet pages." +#: ../jitsi-meet-web-config.templates:6001 +msgid "Hostname:" +msgstr "" + +#. Type: string +#. Description +#: ../jitsi-meet-web-config.templates:6001 +msgid "" +"The Jitsi Meet web config package needs the DNS hostname of your instance." msgstr "" diff --git a/doc/debian/jitsi-meet/jitsi-meet.example b/doc/debian/jitsi-meet/jitsi-meet.example index fb4f3a887..28797c6a2 100644 --- a/doc/debian/jitsi-meet/jitsi-meet.example +++ b/doc/debian/jitsi-meet/jitsi-meet.example @@ -15,8 +15,8 @@ server { add_header Strict-Transport-Security "max-age=31536000"; - ssl_certificate /var/lib/prosody/jitsi-meet.example.com.crt; - ssl_certificate_key /var/lib/prosody/jitsi-meet.example.com.key; + ssl_certificate /etc/jitsi/meet/jitsi-meet.example.com.crt; + ssl_certificate_key /etc/jitsi/meet/jitsi-meet.example.com.key; root /usr/share/jitsi-meet; index index.html index.htm;