From a2801949e8a6f4b808b9ea3398fe8860c4b7f1a9 Mon Sep 17 00:00:00 2001 From: Janek <6506725+jkrgr0@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:46:21 +0000 Subject: [PATCH] fix(2fauth): :bug: Fixed unbound variable --- install/2fauth-install.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/install/2fauth-install.sh b/install/2fauth-install.sh index 1e0dfb5e..fc767d37 100644 --- a/install/2fauth-install.sh +++ b/install/2fauth-install.sh @@ -49,9 +49,9 @@ msg_info "Setup ${APPLICATION}" RELEASE=$(curl -s https://api.github.com/repos/Bubka/2FAuth/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') wget -q "https://github.com/Bubka/2FAuth/archive/refs/tags/${RELEASE}.zip" unzip -q "${RELEASE}.zip" -mv "${APPLICATION}-${RELEASE}/" "/opt/${NSAPP}" +mv "${APPLICATION}-${RELEASE}/" "/opt/${app}" -cd "/opt/${NSAPP}" || return +cd "/opt/${app}" || return cp .env.example .env IPADDRESS=$(hostname -I | awk '{print $1}') @@ -63,8 +63,8 @@ sed -i -e "s|^APP_URL=.*|APP_URL=http://$IPADDRESS|" \ -e "s|^DB_USERNAME=$|DB_USERNAME=$DB_USER|" \ -e "s|^DB_PASSWORD=$|DB_PASSWORD=$DB_PASS|" .env -chown -R www-data: "/opt/${NSAPP}" -chmod -R 755 "/opt/${NSAPP}" +chown -R www-data: "/opt/${app}" +chmod -R 755 "/opt/${app}" export COMPOSER_ALLOW_SUPERUSER=1 $STD composer update --no-plugins --no-scripts @@ -77,15 +77,15 @@ $STD php artisan passport:install -q -n $STD php artisan storage:link $STD php artisan config:cache -echo "${RELEASE}" >"/opt/${NSAPP}_version.txt" -msg_ok "Setup ${NSAPP}" +echo "${RELEASE}" >"/opt/${app}_version.txt" +msg_ok "Setup ${app}" # Configure Service (NGINX) msg_info "Configure Service" cat </etc/nginx/conf.d/2fauth.conf server { listen 80; - root /opt/${NSAPP}/public; + root /opt/${app}/public; server_name $IPADDRESS; index index.php; charset utf-8;