From a1a2c4036f71f4a22dc31fbd545372eb056b23bc Mon Sep 17 00:00:00 2001 From: Ollama Date: Mon, 18 May 2026 14:14:32 +0200 Subject: [PATCH] fix: address CodeRabbit review comments - Remove duplicate php-gd package - Disable directory listing (Options -Indexes) - Propagate MYSQL_ROOT_PASS to all mysql commands - Fix allowedHostnames sed pattern to match .env.example format --- scripts/install-ubuntu.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/scripts/install-ubuntu.sh b/scripts/install-ubuntu.sh index fc899d53e..90e3251d5 100644 --- a/scripts/install-ubuntu.sh +++ b/scripts/install-ubuntu.sh @@ -86,7 +86,6 @@ apt-get install -y -qq \ php${PHP_VERSION}-curl \ php${PHP_VERSION}-xml \ php${PHP_VERSION}-zip \ - php${PHP_VERSION}-gd \ git \ curl \ unzip \ @@ -105,12 +104,21 @@ else fi echo -e "${COLOR_GREEN}[4/9] Creating database and user...${COLOR_RESET}" -mysql -u root < /etc/apache2/sites-available/ospos.conf < - Options Indexes FollowSymLinks + Options -Indexes +FollowSymLinks AllowOverride All Require all granted @@ -276,7 +288,7 @@ elif [ -n "$SSL_DOMAIN" ]; then SSLCertificateKeyFile /etc/ssl/private/ospos-selfsigned.key - Options Indexes FollowSymLinks + Options -Indexes +FollowSymLinks AllowOverride All Require all granted @@ -313,7 +325,7 @@ systemctl restart apache2 # Configure allowed hostnames if [ -f "${OSPOS_DIR}/.env" ]; then - sed -i "s/app\.allowedHostnames\.0 = 'localhost'/app.allowedHostnames.0 = '${APACHE_SERVER_NAME}'/" ${OSPOS_DIR}/.env + sed -i "s|app\.allowedHostnames = ''|app.allowedHostnames = '${APACHE_SERVER_NAME}'|" ${OSPOS_DIR}/.env fi echo ""