jra_nextcloud.sh: fix key agregation and variable collection.

This commit is contained in:
Luis Guzmán 2023-02-22 03:54:21 -06:00
parent 1bd3f86cc4
commit c633c11149
1 changed files with 20 additions and 21 deletions

View File

@ -51,7 +51,7 @@ PHP_FPM_DIR="/etc/php/$PHPVER/fpm"
PHP_INI="$PHP_FPM_DIR/php.ini" PHP_INI="$PHP_FPM_DIR/php.ini"
PHP_CONF="/etc/php/$PHPVER/fpm/pool.d/www.conf" PHP_CONF="/etc/php/$PHPVER/fpm/pool.d/www.conf"
NC_NGINX_SSL_PORT="$(grep "listen 44" /etc/nginx/sites-available/"$DOMAIN".conf | awk '{print$2}')" NC_NGINX_SSL_PORT="$(grep "listen 44" /etc/nginx/sites-available/"$DOMAIN".conf | awk '{print$2}')"
[ -z $NC_NGINX_SSL_PORT ] && NC_NGINX_SSL_PORT="443" [ -z "$NC_NGINX_SSL_PORT" ] && NC_NGINX_SSL_PORT="443"
NC_REPO="https://download.nextcloud.com/server/releases" NC_REPO="https://download.nextcloud.com/server/releases"
NCVERSION="$(curl -s -m 900 $NC_REPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | tail -1)" NCVERSION="$(curl -s -m 900 $NC_REPO/ | sed --silent 's/.*href="nextcloud-\([^"]\+\).zip.asc".*/\1/p' | sort --version-sort | tail -1)"
STABLEVERSION="nextcloud-$NCVERSION" STABLEVERSION="nextcloud-$NCVERSION"
@ -63,7 +63,6 @@ NC_DB_PASSWD="$(tr -dc "a-zA-Z0-9#_*=" < /dev/urandom | fold -w 14 | head -n1)"
DIR_RECORD="$(awk -F '"' '/RECORDING/{print$2}' /home/jibri/finalize_recording.sh|awk 'NR==1{print$1}')" DIR_RECORD="$(awk -F '"' '/RECORDING/{print$2}' /home/jibri/finalize_recording.sh|awk 'NR==1{print$1}')"
REDIS_CONF="/etc/redis/redis.conf" REDIS_CONF="/etc/redis/redis.conf"
JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf" JITSI_MEET_PROXY="/etc/nginx/modules-enabled/60-jitsi-meet.conf"
[ -f "$JITSI_MEET_PROXY" ] && PREAD_PROXY=$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -f1) [ -f "$JITSI_MEET_PROXY" ] && PREAD_PROXY=$(grep -nr "preread_server_name" "$JITSI_MEET_PROXY" | cut -d ":" -f1)
PUBLIC_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)" PUBLIC_IP="$(dig +short myip.opendns.com @resolver1.opendns.com)"
ISO3166_CODE=TBD ISO3166_CODE=TBD
@ -79,7 +78,7 @@ mv "$TMP_GPG_REPO"/"$1".gpg /etc/apt/trusted.gpg.d/
install_aval_package() { install_aval_package() {
for i in $1 for i in $1
do do
if [ -z "$(apt-cache madison $i 2>/dev/null)" ]; then if [ -z "$(apt-cache madison "$i" 2>/dev/null)" ]; then
echo " > Package $i not available on repo." echo " > Package $i not available on repo."
else else
echo " > Add package $i to the install list" echo " > Add package $i to the install list"
@ -215,23 +214,23 @@ install_ifnot postgresql-"$PSGVER"
add_php add_php
install_aval_package " \ install_aval_package " \
imagemagick \ imagemagick \
php"$PHPVER"-fpm \ php$PHPVER-fpm \
php"$PHPVER"-bcmath \ php$PHPVER-bcmath \
php"$PHPVER"-bz2 \ php$PHPVER-bz2 \
php"$PHPVER"-curl \ php$PHPVER-curl \
php"$PHPVER"-gd \ php$PHPVER-gd \
php"$PHPVER"-gmp \ php$PHPVER-gmp \
php"$PHPVER"-imagick \ php$PHPVER-imagick \
php"$PHPVER"-intl \ php$PHPVER-intl \
php"$PHPVER"-json \ php$PHPVER-json \
php"$PHPVER"-ldap \ php$PHPVER-ldap \
php"$PHPVER"-mbstring \ php$PHPVER-mbstring \
php"$PHPVER"-pgsql \ php$PHPVER-pgsql \
php"$PHPVER"-redis \ php$PHPVER-redis \
php"$PHPVER"-soap \ php$PHPVER-soap \
php"$PHPVER"-xml \ php$PHPVER-xml \
php"$PHPVER"-xmlrpc \ php$PHPVER-xmlrpc \
php"$PHPVER"-zip \ php$PHPVER-zip \
redis-server \ redis-server \
unzip \ unzip \
" "