From ecb110e9ef84a900b0a1758f453bf9d3d161e47b Mon Sep 17 00:00:00 2001 From: Mateusz <2871798+orhtej2@users.noreply.github.com> Date: Sat, 3 Aug 2024 23:57:36 +0200 Subject: [PATCH] Fix upgrade. --- manifest.toml | 17 ++++++++++++++++- scripts/upgrade | 7 ++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/manifest.toml b/manifest.toml index 8ad82f3..63780d0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -61,7 +61,22 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server, php8.3-uuid, php8.3-imagick, php8.3-sqlite3, php8.3-tidy, php8.3-dom, php8.3-intl, php8.3-mysql, php8.3-curl, php8.3-gd, php8.3-cli, php8.3-xml, php8.3-mbstring, php8.3-ldap" + packages = [ + "mariadb-server", + "php8.3-uuid", + "php8.3-imagick", + "php8.3-sqlite3", + "php8.3-tidy", + "php8.3-dom", + "php8.3-intl", + "php8.3-mysql", + "php8.3-curl", + "php8.3-gd", + "php8.3-cli", + "php8.3-xml", + "php8.3-mbstring", + "php8.3-ldap", + ] [resources.database] type = "mysql" diff --git a/scripts/upgrade b/scripts/upgrade index ff15b2a..11da544 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,9 +16,6 @@ then mkdir -p $install_dir/app # Ugly way to not return an error when moving everything to a subfolter of the same folder https://stackoverflow.com/a/43262922 find $install_dir -maxdepth 1 -mindepth 1 -not -name app -exec mv -t $install_dir/app {} + - chown $app:www-data $install_dir/app/ - chown $app:$app -R "$install_dir/app/data/_data_" - chmod 600 "$install_dir/app/data/_data_/_default_/configs/application.ini" fi #================================================= @@ -51,8 +48,8 @@ ynh_config_add_logrotate #ynh_config_add --template="application.ini" --destination="$install_dir/app/data/_data_/_default_/configs/application.ini" -chmod 600 "$install_dir/app/data/_data_/_default_/configs/application.ini" -chown -R $app:$app "$install_dir/app/data/_data_" +chmod -R 600 "$install_dir/app/data" +chown -R $app:$app "$install_dir/app/data" #================================================= # SETUP SSO