Compare commits

...

24 Commits

Author SHA1 Message Date
4b6677618e testing to see if it works 2025-07-22 15:20:06 +02:00
f0c57bf448 test again 2025-07-22 15:19:53 +02:00
a01a9111ca testing to see if workflow runs and works 2025-07-22 15:18:46 +02:00
5af1aa3f81 testing 2025-07-22 15:18:33 +02:00
4681abc99e test to see if workflow passes 2025-07-22 15:17:14 +02:00
955521e272 test to see if workflow fails 2025-07-22 15:17:00 +02:00
bdc96deec2 Consolidate JSON validation workflow: Migrate test-jsons.yml functionality into frontend-cicd.yml, enhancing CI process by validating JSON files in the public directory with Python. 2025-07-22 15:16:03 +02:00
4b9c00707d Update description in apache-tomcat.json for clarity and consistency. 2025-07-22 14:55:30 +02:00
0a3f28c8f8 test github workflow 2025-07-22 14:55:18 +02:00
878d107e30 Refactor GitHub Actions workflow to validate JSON files using Python. 2025-07-22 14:54:55 +02:00
362d3344f7 Revalidate json script to also test workflow 2025-07-22 14:28:03 +02:00
ff45bd69a7 test new github workflow by invalidating script 2025-07-22 14:27:37 +02:00
9c0c4da881 Add GitHub Actions workflow to validate JSON files in the frontend directory 2025-07-22 14:26:26 +02:00
44c584dced Update versions.json (#6149)
Co-authored-by: GitHub Actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-22 14:05:29 +02:00
2bede5256f Update CHANGELOG.md (#6145)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-22 11:14:28 +00:00
2848cf6d6b [core]: tools.func: increase setup_php function (#6141)
* tools.func: increase setup_php function

* better verbose output
2025-07-22 13:14:09 +02:00
bce076161e Update CHANGELOG.md (#6144)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-22 10:18:15 +00:00
040a15aa3e Update CHANGELOG.md (#6143)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-22 10:17:58 +00:00
5c0cffce6f gitea-mirror: add: migration to 3.0 (#6138) 2025-07-22 12:17:53 +02:00
d552fb86c1 LinkStack (#6137)
* 'Add new script'

* Update linkstack.sh

* Update linkstack.json

* Update linkstack.sh

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-07-22 12:17:35 +02:00
42af89dd2d Update CHANGELOG.md (#6140)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-22 08:38:15 +00:00
003fc3c080 fix(nginxproxymanager.sh): Set the version number before build. (#6139)
Signed-off-by: JMarcosHP <jehuherrerap@hotmail.com>
2025-07-22 10:37:54 +02:00
a638dc8672 Update CHANGELOG.md (#6135)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-07-22 06:48:54 +00:00
d7668531e7 wallos: add cron in installer for yearly cost (#6133)
* wallos: fix: yearly cost

* Update wallos.sh

* Update wallos.sh

---------

Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-07-22 08:48:29 +02:00
12 changed files with 364 additions and 87 deletions

81
.github/workflows/frontend-cicd.yml generated vendored
View File

@ -24,12 +24,87 @@ concurrency:
cancel-in-progress: false
jobs:
build:
if: github.repository == 'community-scripts/ProxmoxVE'
test-json-files:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend # Set default working directory for all run steps
working-directory: frontend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Test JSON files
run: |
python3 << 'EOF'
import json
import glob
import os
import sys
def test_json_files():
# Change to the correct directory
json_dir = "public/json"
if not os.path.exists(json_dir):
print(f"❌ Directory not found: {json_dir}")
return False
# Find all JSON files
pattern = os.path.join(json_dir, "*.json")
json_files = glob.glob(pattern)
if not json_files:
print(f"⚠️ No JSON files found in {json_dir}")
return True
print(f"Testing {len(json_files)} JSON files for valid syntax...")
invalid_files = []
for file_path in json_files:
try:
with open(file_path, 'r', encoding='utf-8') as f:
json.load(f)
print(f"✅ Valid JSON: {file_path}")
except json.JSONDecodeError as e:
print(f"❌ Invalid JSON syntax in: {file_path}")
print(f" Error: {e}")
invalid_files.append(file_path)
except Exception as e:
print(f"⚠️ Error reading: {file_path}")
print(f" Error: {e}")
invalid_files.append(file_path)
print("\n=== JSON Validation Summary ===")
print(f"Total files tested: {len(json_files)}")
print(f"Valid files: {len(json_files) - len(invalid_files)}")
print(f"Invalid files: {len(invalid_files)}")
if invalid_files:
print("\n❌ Found invalid JSON file(s):")
for file_path in invalid_files:
print(f" - {file_path}")
return False
else:
print("\n✅ All JSON files have valid syntax!")
return True
if __name__ == "__main__":
success = test_json_files()
sys.exit(0 if success else 1)
EOF
build:
if: github.repository == 'community-scripts/ProxmoxVE'
needs: test-json-files
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- name: Checkout
uses: actions/checkout@v4

View File

@ -10,6 +10,30 @@
> [!CAUTION]
Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit the project's popularity for potentially malicious purposes.
## 2025-07-22
### 🆕 New Scripts
- LinkStack ([#6137](https://github.com/community-scripts/ProxmoxVE/pull/6137))
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- fix(nginxproxymanager.sh): Set the version number before build. [@JMarcosHP](https://github.com/JMarcosHP) ([#6139](https://github.com/community-scripts/ProxmoxVE/pull/6139))
- #### ✨ New Features
- wallos: add cron in installer for yearly cost [@CrazyWolf13](https://github.com/CrazyWolf13) ([#6133](https://github.com/community-scripts/ProxmoxVE/pull/6133))
- #### 💥 Breaking Changes
- gitea-mirror: add: migration to 3.0 [@CrazyWolf13](https://github.com/CrazyWolf13) ([#6138](https://github.com/community-scripts/ProxmoxVE/pull/6138))
- #### 🔧 Refactor
- [core]: tools.func: increase setup_php function [@MickLesk](https://github.com/MickLesk) ([#6141](https://github.com/community-scripts/ProxmoxVE/pull/6141))
## 2025-07-21
### 🆕 New Scripts

View File

@ -28,6 +28,26 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
APP_VERSION=$(grep -o '"version": *"[^"]*"' /opt/gitea-mirror/package.json | cut -d'"' -f4)
if [[ $APP_VERSION =~ ^2\. ]]; then
if ! whiptail --backtitle "Gitea Mirror Update" --title "⚠️ VERSION 2.x DETECTED" --yesno \
"WARNING: Version $APP_VERSION detected!\n\nUpdating from version 2.x will CLEAR ALL CONFIGURATION.\n\nThis includes:\n• API tokens\n• User settings\n• Repository configurations\n• All custom settings\n\nDo you want to continue with the update process?" 15 70 --defaultno
then
exit 0
fi
if ! whiptail --backtitle "Gitea Mirror Update" --title "⚠️ FINAL CONFIRMATION" --yesno \
"FINAL WARNING: This update WILL clear all configuration!\n\nBEFORE PROCEEDING, please:\n\n• Copy API tokens to a safe location\n• Backup any custom configurations\n• Note down repository settings\n\nThis action CANNOT be undone!" 18 70 --defaultno
then
whiptail --backtitle "Gitea Mirror Update" --title "Update Cancelled" --msgbox "Update process cancelled. Please backup your configuration before proceeding." 8 60
exit 0
fi
whiptail --backtitle "Gitea Mirror Update" --title "Proceeding with Update" --msgbox \
"Proceeding with version $APP_VERSION update.\n\nAll configuration will be cleared as warned." 8 50
rm -rf /opt/gitea-mirror
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/RayLabsHQ/gitea-mirror/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ "${RELEASE}" != "$(cat ~/.${APP} 2>/dev/null || cat /opt/${APP}_version.txt 2>/dev/null)" ]]; then

6
ct/headers/linkstack Normal file
View File

@ -0,0 +1,6 @@
__ _ __ _____ __ __
/ / (_)___ / /__/ ___// /_____ ______/ /__
/ / / / __ \/ //_/\__ \/ __/ __ `/ ___/ //_/
/ /___/ / / / / ,< ___/ / /_/ /_/ / /__/ ,<
/_____/_/_/ /_/_/|_|/____/\__/\__,_/\___/_/|_|

43
ct/linkstack.sh Normal file
View File

@ -0,0 +1,43 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Omar Minaya | MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://linkstack.org/
APP="LinkStack"
var_tags="${var_tags:-os}"
var_cpu="${var_cpu:-1}"
var_ram="${var_ram:-1024}"
var_disk="${var_disk:-5}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -f ~/.linkstack ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
PHP_VERSION="8.3" PHP_MODULE="sqlite3" PHP_APACHE="YES" setup_php
msg_warn "LinkStack should be updated via the user interface."
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}${CL}"

View File

@ -46,6 +46,8 @@ function update_script() {
msg_info "Building Frontend"
(
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json
cd ./frontend || exit
$STD pnpm install
$STD pnpm upgrade
@ -72,8 +74,6 @@ function update_script() {
ln -sf /usr/bin/certbot /opt/certbot/bin/certbot
ln -sf /usr/local/openresty/nginx/sbin/nginx /usr/sbin/nginx
ln -sf /usr/local/openresty/nginx/ /etc/nginx
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" backend/package.json
sed -i "s|\"version\": \"0.0.0\"|\"version\": \"$RELEASE\"|" frontend/package.json
sed -i 's+^daemon+#daemon+g' docker/rootfs/etc/nginx/nginx.conf
NGINX_CONFS=$(find "$(pwd)" -type f -name "*.conf")
for NGINX_CONF in $NGINX_CONFS; do

View File

@ -41,6 +41,9 @@ function update_script() {
rm -rf /opt/wallos/db/wallos.empty.db
mv /opt/wallos.db /opt/wallos/db/wallos.db
mv /opt/logos/* /opt/wallos/images/uploads/logos
if ! grep -q "storetotalyearlycost.php" /opt/wallos.cron; then
echo "30 1 * * 1 php /opt/wallos/endpoints/cronjobs/storetotalyearlycost.php >> /var/log/cron/storetotalyearlycost.log 2>&1" >> /opt/wallos.cron
fi
chown -R www-data:www-data /opt/wallos
chmod -R 755 /opt/wallos
mkdir -p /var/log/cron

View File

@ -0,0 +1,44 @@
{
"name": "LinkStack",
"slug": "linkstack",
"categories": [
9
],
"date_created": "2025-07-22",
"type": "ct",
"updateable": true,
"privileged": false,
"config_path": "/var/www/html/linkstack/.env",
"interface_port": 80,
"documentation": "https://docs.linkstack.org/",
"website": "https://linkstack.org/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/linkstack.webp",
"description": "LinkStack is an open-source, self-hosted alternative to Linktree, allowing users to create a customizable profile page to share multiple links, hosted on their own server.",
"install_methods": [
{
"type": "default",
"script": "ct/linkstack.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 5,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "LinkStack can be updated via the user interface.",
"type": "info"
},
{
"text": "Complete setup via the web interface at http://<container-ip>/. Check installation logs: `cat ~/linkstack-install.log`",
"type": "info"
}
]
}

View File

@ -1,4 +1,44 @@
[
{
"name": "home-assistant/core",
"version": "2025.7.3",
"date": "2025-07-22T08:30:59Z"
},
{
"name": "Checkmk/checkmk",
"version": "v2.3.0p35-rc1",
"date": "2025-07-22T07:29:21Z"
},
{
"name": "zabbix/zabbix",
"version": "7.2.11",
"date": "2025-07-22T07:05:26Z"
},
{
"name": "mattermost/mattermost",
"version": "v9.11.18",
"date": "2025-07-22T06:18:08Z"
},
{
"name": "adityachandelgit/BookLore",
"version": "v0.34.1",
"date": "2025-07-22T05:57:50Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.22.2182",
"date": "2025-07-22T05:55:20Z"
},
{
"name": "lazy-media/Reactive-Resume",
"version": "v1.2.2",
"date": "2025-07-22T03:12:54Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v3.6.2",
"date": "2025-07-17T12:08:03Z"
},
{
"name": "MediaBrowser/Emby.Releases",
"version": "4.9.1.2",
@ -25,9 +65,9 @@
"date": "2025-07-21T20:56:33Z"
},
{
"name": "Checkmk/checkmk",
"version": "v2.4.0p8",
"date": "2025-07-21T19:25:40Z"
"name": "keycloak/keycloak",
"version": "26.2.6",
"date": "2025-07-17T11:16:34Z"
},
{
"name": "mongodb/mongo",
@ -74,11 +114,6 @@
"version": "pmm-6401-v1.122.0",
"date": "2025-07-21T10:40:07Z"
},
{
"name": "zabbix/zabbix",
"version": "7.0.17rc2",
"date": "2025-07-21T10:37:33Z"
},
{
"name": "linuxserver/Heimdall",
"version": "v2.7.1",
@ -99,36 +134,16 @@
"version": "5.0.0",
"date": "2025-07-21T07:16:58Z"
},
{
"name": "mattermost/mattermost",
"version": "preview-v0.1",
"date": "2025-06-27T14:35:47Z"
},
{
"name": "Jackett/Jackett",
"version": "v0.22.2178",
"date": "2025-07-21T05:53:32Z"
},
{
"name": "pocket-id/pocket-id",
"version": "v1.6.4",
"date": "2025-07-21T05:53:30Z"
},
{
"name": "lazy-media/Reactive-Resume",
"version": "1.2.1",
"date": "2025-07-21T03:40:58Z"
},
{
"name": "firefly-iii/firefly-iii",
"version": "v6.2.21",
"date": "2025-07-17T04:46:25Z"
},
{
"name": "steveiliop56/tinyauth",
"version": "v3.6.2",
"date": "2025-07-17T12:08:03Z"
},
{
"name": "Dolibarr/dolibarr",
"version": "21.0.2",
@ -174,11 +189,6 @@
"version": "v2.11.5",
"date": "2025-07-20T03:14:42Z"
},
{
"name": "adityachandelgit/BookLore",
"version": "v0.34.0",
"date": "2025-07-19T22:17:45Z"
},
{
"name": "Luligu/matterbridge",
"version": "3.1.5",
@ -239,11 +249,6 @@
"version": "v3.42.0",
"date": "2025-07-14T22:07:28Z"
},
{
"name": "keycloak/keycloak",
"version": "26.2.6",
"date": "2025-07-17T11:16:34Z"
},
{
"name": "theonedev/onedev",
"version": "v12.0.1",
@ -424,11 +429,6 @@
"version": "v3.5.0",
"date": "2025-07-14T16:54:21Z"
},
{
"name": "home-assistant/core",
"version": "2025.7.2",
"date": "2025-07-14T11:29:58Z"
},
{
"name": "homebridge/homebridge",
"version": "v1.11.0",
@ -569,6 +569,11 @@
"version": "342",
"date": "2025-07-09T08:48:21Z"
},
{
"name": "mysql/mysql-server",
"version": "mysql-cluster-9.4.0",
"date": "2025-07-09T08:35:30Z"
},
{
"name": "Prowlarr/Prowlarr",
"version": "v1.37.0.5076",
@ -1149,11 +1154,6 @@
"version": "v2.2.0",
"date": "2025-03-31T21:31:48Z"
},
{
"name": "mysql/mysql-server",
"version": "mysql-cluster-9.3.0",
"date": "2025-03-31T07:42:45Z"
},
{
"name": "louislam/dockge",
"version": "1.5.0",

View File

@ -0,0 +1,48 @@
#!/usr/bin/env bash
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Omar Minaya | MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://linkstack.org/
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
PHP_VERSION="8.3" PHP_MODULE="sqlite3" PHP_APACHE="YES" setup_php
fetch_and_deploy_gh_release "linkstack" "linkstackorg/linkstack" "prebuild" "latest" "/var/www/html/linkstack" "linkstack.zip"
msg_info "Configuring LinkStack"
$STD a2enmod rewrite
chown -R www-data:www-data /var/www/html/linkstack
chmod -R 755 /var/www/html/linkstack
cat <<EOF >/etc/apache2/sites-available/linkstack.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/linkstack
ErrorLog /var/log/apache2/linkstack-error.log
CustomLog /var/log/apache2/linkstack-access.log combined
<Directory /var/www/html/linkstack/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
EOF
$STD a2dissite 000-default.conf
$STD a2ensite linkstack.conf
$STD systemctl restart apache2
msg_ok "Configured LinkStack"
motd_ssh
customize
msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"

View File

@ -64,6 +64,7 @@ cat <<EOF >/opt/wallos.cron
*/2 * * * * php /opt/wallos/endpoints/cronjobs/sendverificationemails.php >> /var/log/cron/sendverificationemail.log 2>&1
*/2 * * * * php /opt/wallos/endpoints/cronjobs/sendresetpasswordemails.php >> /var/log/cron/sendresetpasswordemails.log 2>&1
0 */6 * * * php /opt/wallos/endpoints/cronjobs/checkforupdates.php >> /var/log/cron/checkforupdates.log 2>&1
30 1 * * 1 php /opt/wallos/endpoints/cronjobs/storetotalyearlycost.php >> /var/log/cron/storetotalyearlycost.log 2>&1
EOF
crontab /opt/wallos.cron
msg_ok "Crontabs setup"

View File

@ -396,9 +396,10 @@ function setup_php() {
COMBINED_MODULES="${DEFAULT_MODULES}"
fi
# Deduplicate modules
# Deduplicate
COMBINED_MODULES=$(echo "$COMBINED_MODULES" | tr ',' '\n' | awk '!seen[$0]++' | paste -sd, -)
# Get current PHP-CLI version
local CURRENT_PHP=""
if command -v php >/dev/null 2>&1; then
CURRENT_PHP=$(php -v 2>/dev/null | awk '/^PHP/{print $2}' | cut -d. -f1,2)
@ -420,53 +421,43 @@ function setup_php() {
$STD apt-get update
fi
# Build module list
local MODULE_LIST="php${PHP_VERSION}"
for pkg in $MODULE_LIST; do
if ! apt-cache show "$pkg" >/dev/null 2>&1; then
msg_error "Package not found: $pkg"
exit 1
fi
done
IFS=',' read -ra MODULES <<<"$COMBINED_MODULES"
for mod in "${MODULES[@]}"; do
if apt-cache show "php${PHP_VERSION}-${mod}" >/dev/null 2>&1; then
MODULE_LIST+=" php${PHP_VERSION}-${mod}"
else
msg_warn "PHP-Module ${mod} for PHP ${PHP_VERSION} not found skipping"
fi
done
if [[ "$PHP_FPM" == "YES" ]]; then
MODULE_LIST+=" php${PHP_VERSION}-fpm"
fi
# install apache2 with PHP support if requested
if [[ "$PHP_APACHE" == "YES" ]]; then
$STD apt-get install -y apache2 libapache2-mod-php${PHP_VERSION}
$STD systemctl restart apache2 || true
if ! dpkg -l | grep -q "libapache2-mod-php${PHP_VERSION}"; then
$STD msg_info "Installing Apache with PHP${PHP_VERSION} support"
$STD apt-get install -y apache2 libapache2-mod-php"${PHP_VERSION}"
$STD msg_ok "Setup Apache with PHP${PHP_VERSION}"
fi
fi
if [[ "$PHP_APACHE" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then
if [[ -f /etc/apache2/mods-enabled/php${CURRENT_PHP}.load ]]; then
$STD a2dismod php${CURRENT_PHP} || true
fi
$STD a2enmod php${PHP_VERSION}
$STD systemctl restart apache2 || true
fi
if [[ "$PHP_FPM" == "YES" ]] && [[ -n "$CURRENT_PHP" ]]; then
$STD systemctl stop php${CURRENT_PHP}-fpm || true
$STD systemctl disable php${CURRENT_PHP}-fpm || true
fi
$STD apt-get install -y $MODULE_LIST
# setup / update PHP modules
$STD apt-get install -y "$MODULE_LIST"
msg_ok "Setup PHP $PHP_VERSION"
if [[ "$PHP_FPM" == "YES" ]]; then
$STD systemctl enable php${PHP_VERSION}-fpm
$STD systemctl restart php${PHP_VERSION}-fpm
# optional stop old PHP-FPM service
if [[ "$PHP_FPM" == "YES" && -n "$CURRENT_PHP" && "$CURRENT_PHP" != "$PHP_VERSION" ]]; then
$STD systemctl stop php"${CURRENT_PHP}"-fpm || true
$STD systemctl disable php"${CURRENT_PHP}"-fpm || true
fi
# Patch all relevant php.ini files
local PHP_INI_PATHS=("/etc/php/${PHP_VERSION}/cli/php.ini")
[[ "$PHP_FPM" == "YES" ]] && PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/fpm/php.ini")
[[ "$PHP_APACHE" == "YES" ]] && PHP_INI_PATHS+=("/etc/php/${PHP_VERSION}/apache2/php.ini")
for ini in "${PHP_INI_PATHS[@]}"; do
if [[ -f "$ini" ]]; then
$STD msg_info "Patching $ini"
@ -477,6 +468,28 @@ function setup_php() {
$STD msg_ok "Patched $ini"
fi
done
# patch Apache configuration if needed
if [[ "$PHP_APACHE" == "YES" ]]; then
for mod in $(ls /etc/apache2/mods-enabled/ 2>/dev/null | grep -E '^php[0-9]\.[0-9]\.conf$' | sed 's/\.conf//'); do
if [[ "$mod" != "php${PHP_VERSION}" ]]; then
$STD a2dismod "$mod" || true
fi
done
$STD a2enmod mpm_prefork
$STD a2enmod "php${PHP_VERSION}"
$STD systemctl restart apache2 || true
fi
# enable and restart PHP-FPM if requested
if [[ "$PHP_FPM" == "YES" ]]; then
if systemctl list-unit-files | grep -q "php${PHP_VERSION}-fpm.service"; then
$STD systemctl enable php"${PHP_VERSION}"-fpm
$STD systemctl restart php"${PHP_VERSION}"-fpm
else
msg_warn "FPM requested but service php${PHP_VERSION}-fpm not found"
fi
fi
}
# ------------------------------------------------------------------------------
@ -794,7 +807,7 @@ function fetch_and_deploy_gh_release() {
local max_retries=3 retry_delay=2 attempt=1 success=false resp http_code
while ((attempt <= max_retries)); do
resp=$(curl $api_timeout -fsSL -w "%{http_code}" -o /tmp/gh_rel.json "${header[@]}" "$api_url") && success=true && break
resp=$(curl "$api_timeout" -fsSL -w "%{http_code}" -o /tmp/gh_rel.json "${header[@]}" "$api_url") && success=true && break
sleep "$retry_delay"
((attempt++))
done
@ -832,7 +845,7 @@ function fetch_and_deploy_gh_release() {
[[ -z "$url" ]] && url="https://github.com/$repo/archive/refs/tags/v$version.tar.gz"
filename="${app_lc}-${version}.tar.gz"
curl $download_timeout -fsSL -o "$tmpdir/$filename" "$url" || {
curl "$download_timeout" -fsSL -o "$tmpdir/$filename" "$url" || {
msg_error "Download failed: $url"
rm -rf "$tmpdir"
return 1
@ -888,7 +901,7 @@ function fetch_and_deploy_gh_release() {
fi
filename="${url_match##*/}"
curl $download_timeout -fsSL -o "$tmpdir/$filename" "$url_match" || {
curl "$download_timeout" -fsSL -o "$tmpdir/$filename" "$url_match" || {
msg_error "Download failed: $url_match"
rm -rf "$tmpdir"
return 1
@ -931,7 +944,7 @@ function fetch_and_deploy_gh_release() {
}
filename="${asset_url##*/}"
curl $download_timeout -fsSL -o "$tmpdir/$filename" "$asset_url" || {
curl "$download_timeout" -fsSL -o "$tmpdir/$filename" "$asset_url" || {
msg_error "Download failed: $asset_url"
rm -rf "$tmpdir"
return 1
@ -1007,7 +1020,7 @@ function fetch_and_deploy_gh_release() {
local target_file="$app"
[[ "$use_filename" == "true" ]] && target_file="$filename"
curl $download_timeout -fsSL -o "$target/$target_file" "$asset_url" || {
curl "$download_timeout" -fsSL -o "$target/$target_file" "$asset_url" || {
msg_error "Download failed: $asset_url"
rm -rf "$tmpdir"
return 1