From 7373c26b7fec3d0b7301a3bfa62b550920ddb99f Mon Sep 17 00:00:00 2001 From: MickLesk Date: Sat, 1 Aug 2026 22:21:45 +0200 Subject: [PATCH] refactor olivethin --- tools/addon/olivetin.sh | 4 ++-- tools/addon/phpmyadmin.sh | 17 +++++++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tools/addon/olivetin.sh b/tools/addon/olivetin.sh index 67df82f1f..3fa78d158 100644 --- a/tools/addon/olivetin.sh +++ b/tools/addon/olivetin.sh @@ -39,8 +39,8 @@ header_info msg_info "Installing ${APP}" if ! command -v curl &>/dev/null; then - $STD apt-get update - $STD apt-get install -y curl + $STD apt update + $STD apt install -y curl fi curl -fsSL "https://github.com/OliveTin/OliveTin/releases/latest/download/OliveTin_linux_amd64.deb" -o OliveTin_linux_amd64.deb $STD dpkg -i OliveTin_linux_amd64.deb diff --git a/tools/addon/phpmyadmin.sh b/tools/addon/phpmyadmin.sh index 41b11c2a0..d54d86456 100644 --- a/tools/addon/phpmyadmin.sh +++ b/tools/addon/phpmyadmin.sh @@ -46,8 +46,8 @@ header_info function check_internet() { if ! command -v curl &>/dev/null; then - $STD apt-get update - $STD apt-get install -y curl + $STD apt update + $STD apt install -y curl fi msg_info "Checking Internet connectivity to GitHub" HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://github.com) @@ -86,7 +86,7 @@ function install_php_and_modules() { done if [[ ${#MISSING_PACKAGES[@]} -gt 0 ]]; then msg_info "Installing missing PHP packages: ${MISSING_PACKAGES[*]}" - if ! $STD apt-get update || ! $STD apt-get install -y "${MISSING_PACKAGES[@]}"; then + if ! $STD apt update || ! $STD apt install -y "${MISSING_PACKAGES[@]}"; then msg_error "Failed to install required PHP modules. Exiting." exit 237 fi @@ -96,7 +96,16 @@ function install_php_and_modules() { fi else msg_info "Installing Lighttpd and PHP for Alpine" - $STD $PKG_MANAGER_INSTALL lighttpd php php-fpm php-session php-json php-mysqli curl tar openssl + $STD $PKG_MANAGER_INSTALL \ + lighttpd \ + php \ + php-fpm \ + php-session \ + php-json \ + php-mysqli \ + curl \ + tar \ + openssl msg_ok "Installed Lighttpd and PHP" fi }