From fe92a417283142cefe80d6280e9809a6f9df95d2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Fri, 14 May 2021 14:29:24 +0200 Subject: [PATCH] fix --- manifest.json | 2 +- scripts/install | 13 ++++--------- scripts/restore | 5 +++-- scripts/upgrade | 11 +++-------- 4 files changed, 11 insertions(+), 20 deletions(-) diff --git a/manifest.json b/manifest.json index fb7fb09..1e88f64 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.2.4" }, "multi_instance": false, "services": [ diff --git a/scripts/install b/scripts/install index 2c1c9e7..763fef2 100644 --- a/scripts/install +++ b/scripts/install @@ -143,11 +143,6 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=12 -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file=../conf/systemd.service -ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file=../conf/systemd.service -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/systemd.service -ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file=../conf/systemd.service - ynh_add_systemd_config #================================================= @@ -155,7 +150,7 @@ ynh_add_systemd_config #================================================= ynh_script_progression --message="Configuring database..." --weight=1 -cache_dir="/home/$app" +cache_dir="/home/yunohost.app/$app" # Create cachedir folder mkdir -p $cache_dir @@ -172,9 +167,9 @@ popd # SET PERMISSIONS #================================================= -chown -R $app:www-data $final_path -chown -R $app $final_path/src/Movim/ -chmod u+rwx $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/restore b/scripts/restore index 9effe72..a560845 100644 --- a/scripts/restore +++ b/scripts/restore @@ -73,8 +73,9 @@ ynh_system_user_create --username=$app #================================================= # Restore permissions on app files -chown -R $app:www-data $final_path -chown -R $app $final_path/src/Movim/ +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # RESTORE THE PHP-FPM CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 44d4183..42979f8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -128,9 +128,9 @@ ynh_add_fpm_config --package="$extra_php_dependencies" # SET PERMISSIONS #================================================= -chown -R $app:www-data $final_path -chown -R $app $final_path/src/Movim/Bootstrap.php -chmod u+rwx $final_path +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -156,11 +156,6 @@ popd #================================================= ynh_script_progression --message="Upgrading systemd configuration..." --weight=5 -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file=../conf/systemd.service -ynh_replace_string --match_string="__PATH__" --replace_string="$path_url" --target_file=../conf/systemd.service -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file=../conf/systemd.service -ynh_replace_string --match_string="__PHPVERSION__" --replace_string="$phpversion" --target_file=../conf/systemd.service - ynh_add_systemd_config #=================================================