mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-10 16:06:27 +00:00
chevereto: derive php-fpm from one version, use nginx_enable_site
This commit is contained in:
@@ -33,8 +33,10 @@ function update_script() {
|
||||
fi
|
||||
|
||||
if check_for_gh_release "chevereto" "chevereto/chevereto"; then
|
||||
PHP_FPM_SERVICE="$(basename "$(get_php_fpm_socket)" .sock)"
|
||||
|
||||
msg_info "Stopping Services"
|
||||
systemctl stop nginx php8.3-fpm
|
||||
systemctl stop nginx "$PHP_FPM_SERVICE"
|
||||
msg_ok "Stopped Services"
|
||||
|
||||
create_backup /opt/chevereto/app/env.php \
|
||||
@@ -54,7 +56,7 @@ function update_script() {
|
||||
msg_ok "Updated Chevereto"
|
||||
|
||||
msg_info "Starting Services"
|
||||
systemctl start php8.3-fpm nginx
|
||||
systemctl start "$PHP_FPM_SERVICE" nginx
|
||||
msg_ok "Started Services"
|
||||
msg_ok "Updated successfully!"
|
||||
fi
|
||||
|
||||
@@ -20,7 +20,8 @@ $STD apt install -y \
|
||||
libimage-exiftool-perl
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
PHP_VERSION="8.3" PHP_FPM="YES" PHP_MODULE="bcmath,curl,exif,gd,imagick,intl,mbstring,mysql,xml,zip" PHP_UPLOAD_MAX_FILESIZE="512M" PHP_POST_MAX_SIZE="512M" PHP_MAX_EXECUTION_TIME="600" setup_php
|
||||
PHP_VERSION="8.3"
|
||||
PHP_FPM="YES" PHP_MODULE="bcmath,curl,exif,gd,imagick,intl,mbstring,mysql,xml,zip" PHP_UPLOAD_MAX_FILESIZE="512M" PHP_POST_MAX_SIZE="512M" PHP_MAX_EXECUTION_TIME="600" setup_php
|
||||
setup_composer
|
||||
setup_mariadb
|
||||
setup_ffmpeg
|
||||
@@ -79,7 +80,7 @@ server {
|
||||
|
||||
location = /index.php {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass unix:/run/php/php8.3-fpm.sock;
|
||||
fastcgi_pass unix:__PHP_FPM_SOCK__;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
|
||||
fastcgi_read_timeout 600;
|
||||
}
|
||||
@@ -97,11 +98,9 @@ server {
|
||||
}
|
||||
}
|
||||
EOF
|
||||
ln -sf /etc/nginx/sites-available/chevereto /etc/nginx/sites-enabled/chevereto
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
$STD nginx -t
|
||||
systemctl enable -q --now php8.3-fpm
|
||||
systemctl reload nginx
|
||||
sed -i "s|__PHP_FPM_SOCK__|$(get_php_fpm_socket)|" /etc/nginx/sites-available/chevereto
|
||||
systemctl enable -q --now "php${PHP_VERSION}-fpm"
|
||||
nginx_enable_site chevereto
|
||||
msg_ok "Configured Nginx"
|
||||
|
||||
motd_ssh
|
||||
|
||||
Reference in New Issue
Block a user