|
@@ -68,12 +68,11 @@ case "$1" in
|
68
|
68
|
FORCE_APACHE="true"
|
69
|
69
|
fi
|
70
|
70
|
|
|
71
|
+ UPLOADED_CERT_CHOICE="I want to use my own certificate"
|
71
|
72
|
# if first time config ask for certs, or if we are reconfiguring
|
72
|
73
|
if [ -z "$JVB_HOSTNAME_OLD" ] || [ "$RECONFIGURING" = "true" ] ; then
|
73
|
|
- # SSL for nginx
|
74
|
74
|
db_get jitsi-meet/cert-choice
|
75
|
75
|
CERT_CHOICE="$RET"
|
76
|
|
- UPLOADED_CERT_CHOICE="I want to use my own certificate"
|
77
|
76
|
|
78
|
77
|
if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
|
79
|
78
|
db_set jitsi-meet/cert-path-key "/etc/ssl/$JVB_HOSTNAME.key"
|
|
@@ -104,24 +103,55 @@ case "$1" in
|
104
|
103
|
if [ ! -f $JITSI_MEET_CONFIG ] ; then
|
105
|
104
|
cp /usr/share/jitsi-meet-web-config/config.js $JITSI_MEET_CONFIG
|
106
|
105
|
# replaces needed config for multidomain as it works only with nginx
|
107
|
|
- sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
|
|
106
|
+ if [[ "$FORCE_NGINX" = "true" ]] ; then
|
|
107
|
+ sed -i "s/conference.jitsi-meet.example.com/conference.<\!--# echo var=\"subdomain\" default=\"\" -->jitsi-meet.example.com/g" $JITSI_MEET_CONFIG
|
|
108
|
+ fi
|
108
|
109
|
sed -i "s/jitsi-meet.example.com/$JVB_HOSTNAME/g" $JITSI_MEET_CONFIG
|
109
|
110
|
fi
|
110
|
111
|
|
111
|
|
- # this is new install let's configure jvb to serve meet
|
112
|
|
- # no-nginx, no-apache installed on machine, this is new install or reconfiguring old one which have jvb_serve set
|
|
112
|
+ # getting rid of jetty serving web
|
113
|
113
|
if [[ "$JVB_SERVE" = "true" ]] ; then
|
114
|
|
- echo ""
|
115
|
|
- echo "------------------------------------------------"
|
116
|
|
- echo "You are using jetty to serve jitsi-meet, it is recommended to uninstall(purge) and use default installation that comes with nginx!"
|
117
|
|
- echo ""
|
118
|
|
- echo "When using the following command, any custom config will be LOST, please backup /etc/jitsi !!!"
|
119
|
|
- echo ""
|
120
|
|
- echo "You can purge your installation using the following command:"
|
121
|
|
- echo "apt-get purge jitsi-meet jitsi-meet-web-config jitsi-meet-prosody jitsi-meet-web jicofo jitsi-videobridge"
|
122
|
|
- echo "------------------------------------------------"
|
123
|
|
- echo ""
|
124
|
|
- elif [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
|
|
114
|
+ JVB_CONFIG="/etc/jitsi/videobridge/sip-communicator.properties"
|
|
115
|
+
|
|
116
|
+ # we will write to the file if missing create it
|
|
117
|
+ if [ -f $JVB_CONFIG ] ; then
|
|
118
|
+ echo ""
|
|
119
|
+ echo "------------------------------------------------"
|
|
120
|
+ echo ""
|
|
121
|
+ echo "You are using jetty to serve jitsi-meet, we are now upgrading you to use nginx!"
|
|
122
|
+ echo ""
|
|
123
|
+ echo "------------------------------------------------"
|
|
124
|
+ echo ""
|
|
125
|
+
|
|
126
|
+ sed -i "s/org.jitsi.videobridge.rest.jetty/#org.jitsi.videobridge.rest.jetty/g" $JVB_CONFIG
|
|
127
|
+ sed -i "s/org.jitsi.videobridge.TCP_HARVESTER_PORT/#org.jitsi.videobridge.TCP_HARVESTER_PORT/g" $JVB_CONFIG
|
|
128
|
+
|
|
129
|
+ if [ -d /run/systemd/system ]; then
|
|
130
|
+ systemctl restart jitsi-videobridge2.service >/dev/null || true
|
|
131
|
+ fi
|
|
132
|
+
|
|
133
|
+ # Removing this value will force nginx or apache to be locally configured
|
|
134
|
+ JVB_HOSTNAME_OLD=""
|
|
135
|
+
|
|
136
|
+ db_get jitsi-meet/cert-choice
|
|
137
|
+ CERT_CHOICE="$RET"
|
|
138
|
+ # Fix certs on upgrade from jetty
|
|
139
|
+ if [ "$CERT_CHOICE" = "$UPLOADED_CERT_CHOICE" ] ; then
|
|
140
|
+ db_get jitsi-meet/cert-path-key
|
|
141
|
+ CERT_KEY="$RET"
|
|
142
|
+ db_get jitsi-meet/cert-path-crt
|
|
143
|
+ CERT_CRT="$RET"
|
|
144
|
+ else
|
|
145
|
+ # create self-signed certs
|
|
146
|
+ CERT_KEY="/etc/jitsi/meet/$JVB_HOSTNAME.key"
|
|
147
|
+ CERT_CRT="/etc/jitsi/meet/$JVB_HOSTNAME.crt"
|
|
148
|
+ fi
|
|
149
|
+ fi
|
|
150
|
+
|
|
151
|
+ db_set jitsi-meet/jvb-serve "false"
|
|
152
|
+ fi
|
|
153
|
+
|
|
154
|
+ if [[ "$FORCE_NGINX" = "true" && ( -z "$JVB_HOSTNAME_OLD" || "$RECONFIGURING" = "true" ) ]] ; then
|
125
|
155
|
|
126
|
156
|
# this is a reconfigure, lets just delete old links
|
127
|
157
|
if [ "$RECONFIGURING" = "true" ] ; then
|