mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Merge pull request #493 from YunoHost-Apps/23.0.4
This commit is contained in:
commit
9238901646
12 changed files with 105 additions and 117 deletions
|
@ -17,7 +17,8 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Online storage, file sharing platform and various other applications
|
Online storage, file sharing platform and various other applications
|
||||||
|
|
||||||
**Shipped version:** 22.2.10~ynh1
|
**Shipped version:** 23.0.7~ynh1
|
||||||
|
|
||||||
|
|
||||||
**Demo:** https://demo.nextcloud.com/
|
**Demo:** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,8 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Stockage en ligne, plateforme de partage de fichiers et diverses autres applications
|
Stockage en ligne, plateforme de partage de fichiers et diverses autres applications
|
||||||
|
|
||||||
**Version incluse :** 22.2.10~ynh1
|
**Version incluse :** 23.0.7~ynh1
|
||||||
|
|
||||||
|
|
||||||
**Démo :** https://demo.nextcloud.com/
|
**Démo :** https://demo.nextcloud.com/
|
||||||
|
|
||||||
|
|
|
@ -14,16 +14,18 @@
|
||||||
setup_public=1
|
setup_public=1
|
||||||
upgrade=1
|
upgrade=1
|
||||||
#21.0.2
|
#21.0.2
|
||||||
upgrade=1 from_commit=fa1f0da48d3edbdf5bcb3b8b70a0687b4e878d11
|
upgrade=1 from_commit=e249cced99423d8e6743312361f140c1fbdc3a1d
|
||||||
|
#22.2.3
|
||||||
|
upgrade=1 from_commit=892f02888f31b6a0da850a5f8b2e66a151f84750
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
incorrect_path=1
|
|
||||||
port_already_use=0
|
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
;;; Upgrade options
|
||||||
; commit=fa1f0da48d3edbdf5bcb3b8b70a0687b4e878d11
|
; commit=e249cced99423d8e6743312361f140c1fbdc3a1d
|
||||||
name=Merge pull request #408 from YunoHost-Apps/21.0.2
|
name=Merge pull request #446 from YunoHost-Apps/22.2.0
|
||||||
|
; commit=892f02888f31b6a0da850a5f8b2e66a151f84750
|
||||||
|
name=Merge pull request #457 from YunoHost-Apps/testing
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
manifest_arg=domain=DOMAIN&path=PATH&admin=USER&user_home=1&
|
||||||
|
|
|
@ -8,7 +8,7 @@ location ^~ /.well-known {
|
||||||
|
|
||||||
location = /.well-known/carddav { return 301 __PATH__/remote.php/dav/; }
|
location = /.well-known/carddav { return 301 __PATH__/remote.php/dav/; }
|
||||||
location = /.well-known/caldav { return 301 __PATH__/remote.php/dav/; }
|
location = /.well-known/caldav { return 301 __PATH__/remote.php/dav/; }
|
||||||
|
|
||||||
location = /.well-known/webfinger { return 301 __PATH__/index.php$uri; }
|
location = /.well-known/webfinger { return 301 __PATH__/index.php$uri; }
|
||||||
location = /.well-known/nodeinfo { return 301 __PATH__/index.php$uri; }
|
location = /.well-known/nodeinfo { return 301 __PATH__/index.php$uri; }
|
||||||
|
|
||||||
|
@ -62,9 +62,6 @@ location ^~ __PATH__/ {
|
||||||
# always provides the desired behaviour.
|
# always provides the desired behaviour.
|
||||||
index index.php index.html __PATH__/index.php$request_uri;
|
index index.php index.html __PATH__/index.php$request_uri;
|
||||||
|
|
||||||
# Default Cache-Control policy
|
|
||||||
expires 1m;
|
|
||||||
|
|
||||||
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
|
# Rule borrowed from `.htaccess` to handle Microsoft DAV clients
|
||||||
location = __PATH__/ {
|
location = __PATH__/ {
|
||||||
if ( $http_user_agent ~ ^DavClnt ) {
|
if ( $http_user_agent ~ ^DavClnt ) {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
version = "0.1"
|
version = "1.0"
|
||||||
name = "Nextcloud configuration panel"
|
|
||||||
|
|
||||||
[main]
|
[main]
|
||||||
name = "Nextcloud configuration"
|
name = "Nextcloud configuration"
|
||||||
|
@ -7,7 +6,7 @@ name = "Nextcloud configuration"
|
||||||
[main.php_fpm_config]
|
[main.php_fpm_config]
|
||||||
name = "PHP-FPM configuration"
|
name = "PHP-FPM configuration"
|
||||||
|
|
||||||
[main.php_fpm_config.footprint]
|
[main.php_fpm_config.fpm_footprint]
|
||||||
ask = "Memory footprint of the service?"
|
ask = "Memory footprint of the service?"
|
||||||
choices = ["low", "medium", "high", "specific"]
|
choices = ["low", "medium", "high", "specific"]
|
||||||
default = "low"
|
default = "low"
|
||||||
|
@ -19,8 +18,8 @@ name = "Nextcloud configuration"
|
||||||
default = "0"
|
default = "0"
|
||||||
help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values."
|
help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values."
|
||||||
|
|
||||||
[main.php_fpm_config.usage]
|
[main.php_fpm_config.fpm_usage]
|
||||||
ask = "Expected usage of the service?"
|
ask = "Expected usage of the service?"
|
||||||
choices = ["low", "medium", "high"]
|
choices = ["low", "medium", "high"]
|
||||||
default = "low"
|
default = "low"
|
||||||
help = "low: Personal usage, behind the sso. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding."
|
help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.<br>medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.<br>high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding."
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Online storage, file sharing platform and various other applications",
|
"en": "Online storage, file sharing platform and various other applications",
|
||||||
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
"fr": "Stockage en ligne, plateforme de partage de fichiers et diverses autres applications"
|
||||||
},
|
},
|
||||||
"version": "22.2.10~ynh1",
|
"version": "23.0.7~ynh1",
|
||||||
"url": "https://nextcloud.com",
|
"url": "https://nextcloud.com",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
|
@ -14,24 +14,25 @@
|
||||||
"demo": "https://demo.nextcloud.com/",
|
"demo": "https://demo.nextcloud.com/",
|
||||||
"admindoc": "https://docs.nextcloud.com/server/stable/admin_manual/",
|
"admindoc": "https://docs.nextcloud.com/server/stable/admin_manual/",
|
||||||
"userdoc": "https://docs.nextcloud.com/server/latest/user_manual/en/",
|
"userdoc": "https://docs.nextcloud.com/server/latest/user_manual/en/",
|
||||||
"code": "https://github.com/nextcloud/server"
|
"code": "https://github.com/nextcloud/server",
|
||||||
|
"cpe": "cpe:2.3:a:nextcloud:nextcloud"
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
"name": "Kay0u",
|
"name": "kay0u",
|
||||||
"email": "pierre@kayou.io"
|
"email": "pierre@kayou.io"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.3.0"
|
"yunohost": ">= 11.0.9"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php7.3-fpm",
|
"php8.0-fpm",
|
||||||
"mysql"
|
"mysql"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install": [
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain"
|
"type": "domain"
|
||||||
|
@ -66,4 +67,4 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,10 +1,11 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
YNH_PHP_VERSION="7.3"
|
YNH_PHP_VERSION="8.0"
|
||||||
pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
pkg_dependencies="imagemagick libmagickcore-6.q16-6-extra acl tar smbclient at php${YNH_PHP_VERSION}-bz2 php${YNH_PHP_VERSION}-imap php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-apcu php${YNH_PHP_VERSION}-redis php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-imagick php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-igbinary php${YNH_PHP_VERSION}-bcmath"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
|
|
123
scripts/config
123
scripts/config
|
@ -9,90 +9,87 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
ynh_abort_if_errors
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RETRIEVE ARGUMENTS
|
# RETRIEVE ARGUMENTS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
|
||||||
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
|
current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# LOAD VALUES
|
# SPECIFIC GETTERS FOR TOML SHORT KEY
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Load the real value from the app config or elsewhere.
|
get__fpm_footprint() {
|
||||||
# Then get the value from the form.
|
# Free footprint value for php-fpm
|
||||||
# If the form has a value for a variable, take the value from the form,
|
# Check if current_fpm_footprint is an integer
|
||||||
# Otherwise, keep the value from the app config.
|
if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null
|
||||||
|
then
|
||||||
|
echo "specific"
|
||||||
|
else
|
||||||
|
echo "$current_fpm_footprint"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Footprint for php-fpm
|
get__free_footprint() {
|
||||||
old_fpm_footprint="$(ynh_app_setting_get --app=$app --key=fpm_footprint)"
|
# Free footprint value for php-fpm
|
||||||
fpm_footprint="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FOOTPRINT:-$old_fpm_footprint}"
|
# Check if current_fpm_footprint is an integer
|
||||||
|
if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null
|
||||||
# Free footprint value for php-fpm
|
then
|
||||||
# Check if fpm_footprint is an integer
|
# If current_fpm_footprint is an integer, that's a numeric value for the footprint
|
||||||
if [ "$fpm_footprint" -eq "$fpm_footprint" ] 2> /dev/null
|
echo "$current_fpm_footprint"
|
||||||
then
|
else
|
||||||
# If fpm_footprint is an integer, that's a numeric value for the footprint
|
echo "0"
|
||||||
old_free_footprint=$fpm_footprint
|
fi
|
||||||
fpm_footprint=specific
|
|
||||||
else
|
|
||||||
old_free_footprint=0
|
|
||||||
fi
|
|
||||||
free_footprint="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FREE_FOOTPRINT:-$old_free_footprint}"
|
|
||||||
|
|
||||||
# Usage for php-fpm
|
|
||||||
old_fpm_usage="$(ynh_app_setting_get --app=$app --key=fpm_usage)"
|
|
||||||
fpm_usage="${YNH_CONFIG_MAIN_PHP_FPM_CONFIG_USAGE:-$old_fpm_usage}"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SHOW_CONFIG FUNCTION FOR 'SHOW' COMMAND
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
show_config() {
|
|
||||||
# here you are supposed to read some config file/database/other then print the values
|
|
||||||
# ynh_return "YNH_CONFIG_${PANEL_ID}_${SECTION_ID}_${OPTION_ID}=value"
|
|
||||||
|
|
||||||
ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FOOTPRINT=$fpm_footprint"
|
|
||||||
ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_FREE_FOOTPRINT=$free_footprint"
|
|
||||||
ynh_return "YNH_CONFIG_MAIN_PHP_FPM_CONFIG_USAGE=$fpm_usage"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY THE CONFIGURATION
|
# SPECIFIC SETTERS FOR TOML SHORT KEYS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
apply_config() {
|
set__fpm_footprint() {
|
||||||
|
if [ "$fpm_footprint" != "specific" ]
|
||||||
#=================================================
|
|
||||||
# RECONFIGURE PHP-FPM
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
if [ "$fpm_usage" != "$old_fpm_usage" ] || [ "$fpm_footprint" != "$old_fpm_footprint" ] || [ "$free_footprint" != "$old_free_footprint" ]
|
|
||||||
then
|
then
|
||||||
# If fpm_footprint is set to 'specific', use $free_footprint value.
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_footprint"
|
||||||
if [ "$fpm_footprint" = "specific" ]
|
fi
|
||||||
then
|
}
|
||||||
fpm_footprint=$free_footprint
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$fpm_footprint" != "0" ]
|
set__free_footprint() {
|
||||||
then
|
if [ "$fpm_footprint" == "specific" ]
|
||||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint --package="$extra_php_dependencies"
|
then
|
||||||
else
|
ynh_app_setting_set --app=$app --key=fpm_footprint --value="$free_footprint"
|
||||||
ynh_print_err --message="When selecting 'specific', you have to set a footprint value into the field below."
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
# SELECT THE ACTION FOLLOWING THE GIVEN ARGUMENT
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
case $1 in
|
ynh_app_config_validate() {
|
||||||
show) show_config;;
|
_ynh_app_config_validate
|
||||||
apply) apply_config;;
|
|
||||||
esac
|
if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[free_footprint]}" == "true" ]; then
|
||||||
|
# If fpm_footprint is set to 'specific', use $free_footprint value.
|
||||||
|
if [ "$fpm_footprint" == "specific" ]
|
||||||
|
then
|
||||||
|
fpm_footprint=$free_footprint
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$fpm_footprint" == "0" ]
|
||||||
|
then
|
||||||
|
ynh_print_err --message="When selecting 'specific', you have to set a footprint value into the field below."
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
ynh_app_config_apply() {
|
||||||
|
_ynh_app_config_apply
|
||||||
|
|
||||||
|
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
||||||
|
}
|
||||||
|
|
||||||
|
ynh_app_config_run $1
|
||||||
|
|
|
@ -25,6 +25,7 @@ path_url=$YNH_APP_ARG_PATH
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
user_home=$YNH_APP_ARG_USER_HOME
|
user_home=$YNH_APP_ARG_USER_HOME
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
phpversion=$YNH_PHP_VERSION
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
|
||||||
|
@ -104,9 +105,7 @@ ynh_system_user_create --username=$app
|
||||||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=50
|
ynh_script_progression --message="Configuring PHP-FPM..." --weight=50
|
||||||
|
|
||||||
# Create a dedicated php-fpm config
|
# Create a dedicated php-fpm config
|
||||||
ynh_add_fpm_config --usage=medium --footprint=high --phpversion=$YNH_PHP_VERSION
|
ynh_add_fpm_config --usage=medium --footprint=high
|
||||||
# Used by ynh_add_nginx_config
|
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
|
@ -22,7 +22,6 @@ admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
user_home=$(ynh_app_setting_get --app=$app --key=user_home)
|
user_home=$(ynh_app_setting_get --app=$app --key=user_home)
|
||||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
|
||||||
|
|
||||||
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint)
|
||||||
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage)
|
||||||
|
@ -71,11 +70,6 @@ if [ -z "$fpm_usage" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If phpversion doesn't exist, create it
|
|
||||||
if [ -z "$phpversion" ]; then
|
|
||||||
phpversion="$YNH_PHP_VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Cleaning legacy permissions
|
# Cleaning legacy permissions
|
||||||
if ynh_legacy_permissions_exists; then
|
if ynh_legacy_permissions_exists; then
|
||||||
ynh_legacy_permissions_delete_all
|
ynh_legacy_permissions_delete_all
|
||||||
|
@ -88,6 +82,11 @@ if ! ynh_permission_exists --permission="api"; then
|
||||||
ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true"
|
ynh_permission_create --permission="api" --label="api" --url="re:$domain\/.well-known\/.*" --allowed="visitors" "all_users" --auth_header="false" --show_tile="false" --protected="true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Delete existing ini configuration file (backward compatibility)
|
||||||
|
if [ -f /etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini ]; then
|
||||||
|
ynh_secure_remove --file=/etc/php/$YNH_PHP_VERSION/fpm/conf.d/20-$app.ini
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -148,26 +147,10 @@ ynh_system_user_create --username=$app
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
||||||
|
|
||||||
# If php has changed, remove the old fpm config file
|
|
||||||
if [ "$phpversion" != $YNH_PHP_VERSION ]
|
|
||||||
then
|
|
||||||
ynh_backup_if_checksum_is_different --file="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|
||||||
ynh_secure_remove --file="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|
||||||
if [ -f /etc/php/$phpversion/fpm/conf.d/20-$app.ini ]; then
|
|
||||||
ynh_secure_remove --file="/etc/php/$phpversion/fpm/conf.d/20-$app.ini"
|
|
||||||
fi
|
|
||||||
ynh_systemd_action --service_name="php${phpversion}-fpm" --action=reload
|
|
||||||
|
|
||||||
phpversion="$YNH_PHP_VERSION"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Recreate a dedicated PHP-FPM config
|
# Recreate a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
||||||
|
|
||||||
# Delete existing ini configuration file (backward compatibility)
|
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||||
if [ -f /etc/php/$phpversion/fpm/conf.d/20-$app.ini ]; then
|
|
||||||
ynh_secure_remove --file=/etc/php/$phpversion/fpm/conf.d/20-$app.ini
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
|
|
7
scripts/upgrade.d/upgrade.22.sh
Normal file
7
scripts/upgrade.d/upgrade.22.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Last available Nextcloud version
|
||||||
|
next_version="23.0.0"
|
||||||
|
|
||||||
|
# Nextcloud tarball checksum sha256
|
||||||
|
nextcloud_source_sha256="c37592abc3b65c8fd28459281a24f414b87af52fc8c2ea979be3f9be75d01a2c"
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Last available Nextcloud version
|
# Last available Nextcloud version
|
||||||
next_version="22.2.10"
|
next_version="23.0.7"
|
||||||
|
|
||||||
# Nextcloud tarball checksum sha256
|
# Nextcloud tarball checksum sha256
|
||||||
nextcloud_source_sha256="8de167bfcfcaa661245a00a5ac36628e7961951b9fe2dfaf4f8a5aac6907ccdb"
|
nextcloud_source_sha256="89a53d3447d1dcb7ea382d18accf52223040336d08899f0b7568c6dd8a36cd50"
|
||||||
|
|
Loading…
Add table
Reference in a new issue