From cf9486720f96e3a1eaece8ffbb284e1ff88f19fa Mon Sep 17 00:00:00 2001 From: Ark74 Date: Tue, 23 Jan 2024 01:51:58 -0600 Subject: [PATCH] fix missing variable and short url --- jra_nextcloud.sh | 1 - tools/prepare_php.sh | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/jra_nextcloud.sh b/jra_nextcloud.sh index c44bcb0..d0d9ab2 100644 --- a/jra_nextcloud.sh +++ b/jra_nextcloud.sh @@ -43,7 +43,6 @@ apt-get update -q2 apt-get install -y curl letsencrypt nginx MIN_PHP="8.2" -DISTRO_RELEASE="$(lsb_release -sc)" DOMAIN="$(find /etc/prosody/conf.d/ -name \*.lua|awk -F'.cfg' '!/localhost/{print $1}'|xargs basename)" PSGVER="$(apt-cache madison postgresql|tr -d '[:blank:]'|awk -F'[|+]' 'NR==1{print $2}')" NC_NGINX_SSL_PORT="$(grep "listen 44" /etc/nginx/sites-available/"$DOMAIN".conf | awk '{print$2}')" diff --git a/tools/prepare_php.sh b/tools/prepare_php.sh index bc91d18..1e28fb3 100644 --- a/tools/prepare_php.sh +++ b/tools/prepare_php.sh @@ -5,7 +5,9 @@ PHPVER=$1 STABLE_PHP="$(apt-cache madison php|grep -v ppa|awk -F'[:+]' 'NR==1{print $2}')" +DISTRO_RELEASE="$(lsb_release -sc)" PHP_REPO="$(apt-cache policy | awk '/http/&&/php/{print$2}' | awk -F "/" 'NR==1{print$5}')" +PHP_REPO_URL="http://ppa.launchpad.net/ondrej/php/ubuntu" PHP_FPM_DIR="/etc/php/$PHPVER/fpm" PHP_INI="$PHP_FPM_DIR/php.ini" PHP_CONF="/etc/php/$PHPVER/fpm/pool.d/www.conf" @@ -46,7 +48,8 @@ if [ "$PHP_REPO" = "php" ]; then else echo "# Adding Ondrej PHP $PHPVER PPA Repository" add_gpg_keyring E5267A6C - echo "deb [arch=amd64] http://ppa.launchpad.net/ondrej/php/ubuntu $DISTRO_RELEASE main" > /etc/apt/sources.list.d/php"$PHPVER".list + echo "deb [arch=amd64] $PHP_REPO_URL $DISTRO_RELEASE main" | \ + tee /etc/apt/sources.list.d/php"$PHPVER".list apt-get update -q2 fi }