This commit is contained in:
Yasen Pramatarov 2014-09-03 07:59:27 +00:00
commit 692be6a89f
8 changed files with 81 additions and 9 deletions

1
debian/jitsi-meet-prosody.dirs vendored Normal file
View File

@ -0,0 +1 @@
/var/lib/prosody

View File

@ -1 +1 @@
debian/usr/share/* usr/share/
debian/usr/share/doc/jitsi-meet-prosody /usr/share/doc/

8
debian/jitsi-meet.config vendored Normal file
View File

@ -0,0 +1,8 @@
#!/bin/sh -e
# Source debconf library.
. /usr/share/debconf/confmodule
# certificate type choice
db_input critical jitsi-meet/cert-choice || true
db_go

View File

@ -1,2 +1,10 @@
* usr/share/jitsi-meet/
debian/usr/share/* usr/share/
*.js /usr/share/jitsi-meet/
*.json /usr/share/jitsi-meet/
*.html /usr/share/jitsi-meet/
*.ico /usr/share/jitsi-meet/
libs /usr/share/jitsi-meet/
css /usr/share/jitsi-meet/
sounds /usr/share/jitsi-meet/
fonts /usr/share/jitsi-meet/
images /usr/share/jitsi-meet/
debian/usr/share/doc/jitsi-meet /usr/share/doc/

View File

@ -17,7 +17,6 @@ set -e
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
@ -35,6 +34,40 @@ case "$1" in
sed -i "s/#\ server_names_hash_bucket_size\ 64/\ server_names_hash_bucket_size\ 64/" /etc/nginx/nginx.conf
fi
# loading debconf
. /usr/share/debconf/confmodule
# SSL for nginx
db_get jitsi-meet/cert-choice
CERT_CHOICE="$RET"
if [ "$CERT_CHOICE" = 'I want a generated self-signed certificate' ]; then
# self-signed certificate is already in place for prosody
:
elif [ "$CERT_CHOICE" = 'I have a certificate and will upload the files on the server' ]; 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" \
/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" \
/etc/nginx/sites-available/$JVB_HOSTNAME.conf
fi
# and we're done with debconf
db_stop
# jitsi meet
chown -R www-data:www-data /usr/share/jitsi-meet/
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" /usr/share/jitsi-meet/config.js

23
debian/jitsi-meet.templates vendored Normal file
View File

@ -0,0 +1,23 @@
Template: jitsi-meet/cert-choice
Type: select
Choices: I want a generated self-signed certificate, I have a certificate and will upload the files on the server
Description: SSL certificate for the Jitsi Meet instance
Jitsi Meet is best to be set up with an SSL certificate.
If you have no certificate, we can generate a self-signed one.
If you have a certificate signed by a recognised CA, you can upload it on the server
and point us to its location. The default filenames will be /etc/ssl/--domain.name--.key
for the key and /etc/ssl/--domain.name--.crt for the certificate.
Template: jitsi-meet/cert-path-key
Type: string
Default: ${default-key}
Description: Full local server path to the SSL key file
The full path to the SSL key file on the server.
If you haven't uploaded it, now is a good time to upload it in another console.
Template: jitsi-meet/cert-path-crt
Type: string
Default: ${default-crt}
Description: Full local server path to the SSL certificate file
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.

7
debian/rules vendored
View File

@ -10,7 +10,6 @@
#export DH_VERBOSE=1
%:
dh $@
override_dh_install-indep:
dh_install -Xdebian -Xdoc -XINSTALL.md -XLICENSE -XREADME.md usr/share/jitsi-meet/
dh_install
dh_installdirs
dh $@

View File

@ -1,6 +1,6 @@
# Jitsi Meet quick install
This documents decribes the needed steps for quick Jitsi Meet installation on a Debian based GNU/Linux system.
This documents decribes the needed steps for quick Jitsi Meet installation on an Ubuntu 14.04 system.
N.B.: All commands are supposed to be run by root. If you are logged in as a regular user with sudo rights, please prepend ___sudo___ to each of the commands.