From 2af68d90e0d2af60556fcd9549228f28ad239a8b Mon Sep 17 00:00:00 2001 From: Ark74 Date: Mon, 26 Apr 2021 18:42:14 -0500 Subject: [PATCH] New domain variable --- add-jvb2-node.sh | 2 +- grafana.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/add-jvb2-node.sh b/add-jvb2-node.sh index 8d844fd..a651b07 100644 --- a/add-jvb2-node.sh +++ b/add-jvb2-node.sh @@ -59,7 +59,7 @@ START=0 LAST=TBD THIS_SRV_DIST=$(lsb_release -sc) -JITSI_REPO=$(apt-cache policy | grep http | grep jitsi | grep stable | awk '{print $3}' | head -n 1 | cut -d "/" -f1) +JITSI_REPO=$(apt-cache policy | awk '/jitsi/&&/stable/{print$3}' | awk -F / 'NR==1{print$1}') JVB2_CONF="/etc/jitsi/videobridge/config" JVB2_NCONF="/etc/jitsi/videobridge/jvb.conf" JVB2_SIP="/etc/jitsi/videobridge/sip-communicator.properties" diff --git a/grafana.sh b/grafana.sh index 12177c1..f5aba5b 100644 --- a/grafana.sh +++ b/grafana.sh @@ -46,7 +46,7 @@ systemctl status $1 MAIN_TEL="/etc/telegraf/telegraf.conf" TEL_JIT="/etc/telegraf/telegraf.d/jitsi.conf" GRAFANA_INI="/etc/grafana/grafana.ini" -DOMAIN=$(ls /etc/prosody/conf.d/ | grep -v localhost | awk -F'.cfg' '{print $1}' | awk '!NF || !seen[$0]++') +DOMAIN="$(ls /etc/prosody/conf.d/ | awk -F'.cfg' '!/localhost/{print $1}' | awk '!NF || !seen[$0]++')" WS_CONF="/etc/nginx/sites-enabled/$DOMAIN.conf" GRAFANA_PASS="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)"