This commit is contained in:
tremor021 2025-05-18 02:06:01 +02:00
parent a19dc02f0b
commit 63896a75f8

View File

@ -377,13 +377,13 @@ install_php() {
if [[ "$PHP_APACHE" == "YES" ]]; then if [[ "$PHP_APACHE" == "YES" ]]; then
# Optionally disable old Apache PHP module # Optionally disable old Apache PHP module
if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then
$STD a2dismod php"${CURRENT_PHP}" || true $STD a2dismod php${CURRENT_PHP} || true
fi fi
fi fi
if [[ "$PHP_FPM" == "YES" ]]; then if [[ "$PHP_FPM" == "YES" ]]; then
$STD systemctl stop php"${CURRENT_PHP}"-fpm || true $STD systemctl stop php${CURRENT_PHP}-fpm || true
$STD systemctl disable php"${CURRENT_PHP}"-fpm || true $STD systemctl disable php${CURRENT_PHP}-fpm || true
fi fi
$STD apt-get install -y "$MODULE_LIST" $STD apt-get install -y "$MODULE_LIST"
@ -394,8 +394,8 @@ install_php() {
fi fi
if [[ "$PHP_FPM" == "YES" ]]; then if [[ "$PHP_FPM" == "YES" ]]; then
$STD systemctl enable php"${PHP_VERSION}"-fpm $STD systemctl enable php${PHP_VERSION}-fpm
$STD systemctl restart php"${PHP_VERSION}"-fpm $STD systemctl restart php${PHP_VERSION}-fpm
fi fi
# Patch all relevant php.ini files # Patch all relevant php.ini files
@ -667,7 +667,7 @@ fetch_and_deploy_gh_release() {
until [[ $attempt -ge $max_attempts ]]; do until [[ $attempt -ge $max_attempts ]]; do
((attempt++)) || true ((attempt++)) || true
$STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n" $STD msg_info "[$attempt/$max_attempts] Fetching GitHub release for $repo...\n"
api_response=$(curl "$curl_timeout" -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url") api_response=$(curl $curl_timeout -fsSL -w "%{http_code}" -o /tmp/gh_resp.json "${header[@]}" "$api_url")
http_code="${api_response:(-3)}" http_code="${api_response:(-3)}"
if [[ "$http_code" == "404" ]]; then if [[ "$http_code" == "404" ]]; then
msg_error "Repository $repo has no Release candidate (404)" msg_error "Repository $repo has no Release candidate (404)"
@ -773,7 +773,7 @@ fetch_and_deploy_gh_release() {
fi fi
local filename="${url##*/}" local filename="${url##*/}"
$STD msg_info "Downloading $url" $STD msg_info "Downloading $url"
if ! curl "$curl_timeout" -fsSL -o "$tmpdir/$filename" "$url"; then if ! curl $curl_timeout -fsSL -o "$tmpdir/$filename" "$url"; then
msg_error "Failed to download release asset from $url" msg_error "Failed to download release asset from $url"
rm -rf "$tmpdir" rm -rf "$tmpdir"
return 1 return 1