From 330692e457ef2b475046d1724d3f198f007d5512 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Fri, 30 Dec 2022 22:19:57 +0100 Subject: [PATCH] Testing (#73) * 0.9.3 * Auto-update README * Update baikal.yaml * Php (#74) * set php * Fix * Update upgrade Co-authored-by: yunohost-bot --- README.md | 3 +-- README_fr.md | 3 +-- conf/app.src | 4 ++-- conf/baikal.yaml | 2 +- conf/{php-fpm.conf => extra_php-fpm.conf} | 0 conf/nginx.conf | 2 ++ manifest.json | 2 +- scripts/install | 9 ++++++++- scripts/upgrade | 23 ++++++++++++++++++++++- 9 files changed, 38 insertions(+), 10 deletions(-) rename conf/{php-fpm.conf => extra_php-fpm.conf} (100%) diff --git a/README.md b/README.md index d8ce8c9..8349536 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Baïkal allows to seamlessly access your contacts and calendars from every device. It is compatible with iOS, macOS, DAVx5 on Android, Mozilla Thunderbird and every other CalDAV and CardDAV capable application. Protect your privacy by hosting calendars and contacts yourself with Baïkal. -**Shipped version:** 0.9.2~ynh2 - +**Shipped version:** 0.9.3~ynh1 **Demo:** https://demo.yunohost.org/baikal/admin/ diff --git a/README_fr.md b/README_fr.md index 790d012..f12cba1 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,8 +19,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Baïkal permet d'accéder de manière transparente à vos contacts et calendriers depuis n'importe quel appareil. Il est compatible avec iOS, macOS, DAVx5 sur Android, Mozilla Thunderbird et toutes les autres applications compatibles CalDAV et CardDAV. Protégez votre vie privée en hébergeant vous-même des calendriers et contacts avec Baïkal. -**Version incluse :** 0.9.2~ynh2 - +**Version incluse :** 0.9.3~ynh1 **Démo :** https://demo.yunohost.org/baikal/admin/ diff --git a/conf/app.src b/conf/app.src index c419b03..36c0184 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/sabre-io/Baikal/releases/download/0.9.2/baikal-0.9.2.zip -SOURCE_SUM=5feb8488c74fe6b625680654f3d51cdb080dcc6180c1b558543cb25f18f38c65 +SOURCE_URL=https://github.com/sabre-io/Baikal/releases/download/0.9.3/baikal-0.9.3.zip +SOURCE_SUM=d36955ce2e60a03875cf33ad793ddcecfae52096af39de1f2bf709de9f16cb5e SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/baikal.yaml b/conf/baikal.yaml index b6504a9..85ba73b 100644 --- a/conf/baikal.yaml +++ b/conf/baikal.yaml @@ -1,5 +1,5 @@ system: - configured_version: '0.9.2' + configured_version: '0.9.3' timezone: '__TIMEZONE__' card_enabled: true cal_enabled: true diff --git a/conf/php-fpm.conf b/conf/extra_php-fpm.conf similarity index 100% rename from conf/php-fpm.conf rename to conf/extra_php-fpm.conf diff --git a/conf/nginx.conf b/conf/nginx.conf index d29b7e1..ca51a82 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -14,6 +14,8 @@ location __PATH__/ { index index.php; + client_max_body_size 50M; + location ~ ^(.+\.php)(.*)$ { include fastcgi_params; fastcgi_split_path_info ^(.+\.php)(.*)$; diff --git a/manifest.json b/manifest.json index e44cbab..774f340 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Lightweight CalDAV and CardDAV server", "fr": "Serveur CalDAV et CardDAV léger" }, - "version": "0.9.2~ynh2", + "version": "0.9.3~ynh1", "url": "http://baikal-server.com/", "upstream": { "license": "GPL-3.0", diff --git a/scripts/install b/scripts/install index 39b34c0..803ea56 100644 --- a/scripts/install +++ b/scripts/install @@ -26,12 +26,16 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH password=$YNH_APP_ARG_PASSWORD +phpversion=$YNH_PHP_VERSION app=$YNH_APP_INSTANCE_NAME timezone=$(cat /etc/timezone) encrypt_key=$(ynh_string_random 24) password_hash=$(echo -n admin:BaikalDAV:$password | sha256sum | cut -d ' ' -f 1) +fpm_footprint="low" +fpm_free_footprint=0 +fpm_usage="low" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -59,6 +63,9 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=encrypt_key --value="$encrypt_key" ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash" +ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage #================================================= # STANDARD MODIFICATIONS @@ -106,7 +113,7 @@ chown -R $app:www-data "$final_path" ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index fe9e335..e9e9f02 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -26,6 +26,10 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) password_hash=$(ynh_app_setting_get --app=$app --key=password_hash) encrypt_key=$(ynh_app_setting_get --app=$app --key=encrypt_key) +fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) +fpm_free_footprint=$(ynh_app_setting_get --app=$app --key=fpm_free_footprint) +fpm_usage=$(ynh_app_setting_get --app=$app --key=fpm_usage) + #================================================= # CHECK VERSION #================================================= @@ -73,6 +77,23 @@ if [ -z "$password_hash" ]; then ynh_app_setting_set --app=$app --key=password_hash --value=$password_hash fi +# If fpm_footprint doesn't exist, create it +if [ -z "$fpm_footprint" ]; then + fpm_footprint=low + ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint +fi + +# If fpm_free_footprint doesn't exist, create it +if [ -z "$fpm_free_footprint" ]; then + fpm_free_footprint=0 + ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint +fi + +# If fpm_usage doesn't exist, create it +if [ -z "$fpm_usage" ]; then + fpm_usage=low + ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage +fi # Cleaning legacy permissions if ynh_legacy_permissions_exists; then @@ -123,7 +144,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config -ynh_add_fpm_config +ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint #================================================= # NGINX CONFIGURATION