From 29bbcf8590c43fada35cc5c5309de4deeef24f53 Mon Sep 17 00:00:00 2001 From: gpatel-fr <44170243+gpatel-fr@users.noreply.github.com> Date: Thu, 4 Mar 2021 12:29:06 +0100 Subject: [PATCH] handles spaces around hostname ((users doubleclick a host name and paste result in the installer) --- debian/jitsi-meet-prosody.postinst | 4 ++-- debian/jitsi-meet-prosody.postrm | 2 +- debian/jitsi-meet-tokens.postinst | 2 +- debian/jitsi-meet-turnserver.postinst | 4 ++-- debian/jitsi-meet-web-config.postinst | 4 ++-- debian/jitsi-meet-web-config.postrm | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/debian/jitsi-meet-prosody.postinst b/debian/jitsi-meet-prosody.postinst index 89dc23b98..30d83c0d0 100644 --- a/debian/jitsi-meet-prosody.postinst +++ b/debian/jitsi-meet-prosody.postinst @@ -35,7 +35,7 @@ case "$1" in db_input critical jitsi-videobridge/jvb-hostname || true db_go fi - JVB_HOSTNAME="$RET" + JVB_HOSTNAME=$(echo "$RET" | xargs echo -n) db_get jitsi-videobridge/jvbsecret if [ -z "$RET" ] ; then @@ -64,7 +64,7 @@ case "$1" in # detect dpkg-reconfigure, just delete old links db_get jitsi-meet-prosody/jvb-hostname - JVB_HOSTNAME_OLD=$RET + JVB_HOSTNAME_OLD=$(echo "$RET" | xargs echo -n) if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then rm -f /etc/prosody/conf.d/$JVB_HOSTNAME_OLD.cfg.lua rm -f /etc/prosody/certs/$JVB_HOSTNAME_OLD.key diff --git a/debian/jitsi-meet-prosody.postrm b/debian/jitsi-meet-prosody.postrm index 599e392f6..aa7d9a0ad 100644 --- a/debian/jitsi-meet-prosody.postrm +++ b/debian/jitsi-meet-prosody.postrm @@ -31,7 +31,7 @@ case "$1" in purge) db_get jitsi-meet-prosody/jvb-hostname - JVB_HOSTNAME=$RET + JVB_HOSTNAME=$(echo "$RET" | xargs echo -n) if [ -n "$RET" ]; then rm -f /etc/prosody/conf.avail/$JVB_HOSTNAME.cfg.lua rm -f /etc/prosody/conf.d/$JVB_HOSTNAME.cfg.lua diff --git a/debian/jitsi-meet-tokens.postinst b/debian/jitsi-meet-tokens.postinst index db1452f39..d87a1c4f8 100644 --- a/debian/jitsi-meet-tokens.postinst +++ b/debian/jitsi-meet-tokens.postinst @@ -25,7 +25,7 @@ case "$1" in . /usr/share/debconf/confmodule db_get jitsi-meet-prosody/jvb-hostname - JVB_HOSTNAME="$RET" + JVB_HOSTNAME=$(echo "$RET" | xargs echo -n) db_get jitsi-meet-tokens/appid if [ "$RET" = "false" ] ; then diff --git a/debian/jitsi-meet-turnserver.postinst b/debian/jitsi-meet-turnserver.postinst index 6312868ce..aa9fdb703 100644 --- a/debian/jitsi-meet-turnserver.postinst +++ b/debian/jitsi-meet-turnserver.postinst @@ -30,7 +30,7 @@ case "$1" in db_input critical jitsi-videobridge/jvb-hostname || true db_go fi - JVB_HOSTNAME="$RET" + JVB_HOSTNAME=$(echo "$RET" | xargs echo -n) TURN_CONFIG="/etc/turnserver.conf" NGINX_CONFIG="/etc/nginx/sites-available/$JVB_HOSTNAME.conf" @@ -44,7 +44,7 @@ case "$1" in # detect dpkg-reconfigure, just delete old links db_get jitsi-meet-turnserver/jvb-hostname - JVB_HOSTNAME_OLD=$RET + JVB_HOSTNAME_OLD=$(echo "$RET" | xargs echo -n) if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then if [[ -f $TURN_CONFIG ]] && grep -q "jitsi-meet coturn config" "$TURN_CONFIG" ; then rm -f $TURN_CONFIG diff --git a/debian/jitsi-meet-web-config.postinst b/debian/jitsi-meet-web-config.postinst index 7f0bf5a8d..f21b456ff 100644 --- a/debian/jitsi-meet-web-config.postinst +++ b/debian/jitsi-meet-web-config.postinst @@ -32,12 +32,12 @@ case "$1" in db_go db_get jitsi-videobridge/jvb-hostname fi - JVB_HOSTNAME="$RET" + JVB_HOSTNAME=$(echo "$RET" | xargs echo -n) # detect dpkg-reconfigure RECONFIGURING="false" db_get jitsi-meet/jvb-hostname - JVB_HOSTNAME_OLD=$RET + JVB_HOSTNAME_OLD=$(echo "$RET" | xargs echo -n) if [ -n "$RET" ] && [ ! "$JVB_HOSTNAME_OLD" = "$JVB_HOSTNAME" ] ; then RECONFIGURING="true" rm -f /etc/jitsi/meet/$JVB_HOSTNAME_OLD-config.js diff --git a/debian/jitsi-meet-web-config.postrm b/debian/jitsi-meet-web-config.postrm index bf607c5ca..44b7e60ad 100644 --- a/debian/jitsi-meet-web-config.postrm +++ b/debian/jitsi-meet-web-config.postrm @@ -33,7 +33,7 @@ case "$1" in ;; purge) db_get jitsi-meet/jvb-hostname - JVB_HOSTNAME=$RET + JVB_HOSTNAME=$(echo "$RET" | xargs echo -n) if [ -n "$RET" ]; then rm -f /etc/jitsi/meet/$JVB_HOSTNAME-config.js rm -f /etc/nginx/sites-available/$JVB_HOSTNAME.conf