From d1cd1532affdcce72eaba2fed70aaa5e3f83b484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 31 Aug 2024 10:59:41 +0200 Subject: [PATCH] Cleanup after auto patch --- manifest.toml | 2 -- scripts/_common.sh | 12 ++++++------ tests.toml | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/manifest.toml b/manifest.toml index f2f90bf..3a302ae 100644 --- a/manifest.toml +++ b/manifest.toml @@ -53,10 +53,8 @@ ram.runtime = "200M" [resources.system_user] allow_email = true - home = "/opt/yunohost/__APP__" [resources.install_dir] - dir = "/opt/yunohost/__APP__" [resources.data_dir] diff --git a/scripts/_common.sh b/scripts/_common.sh index c2a7916..76f30a7 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -71,15 +71,15 @@ install_source() { set_permission() { # Set permission - #REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" -R "$install_dir" - #REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod u+rw,o= -R "$install_dir" + chown "$app:$app" -R "$install_dir" + chmod u+rw,o= -R "$install_dir" chown "$app:$app" -R "$data_dir" chmod u+rw,o= -R "$data_dir" - #REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" -R /var/log/"$app" - #REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod u=rwX,g=rX,o= -R /var/log/"$app" + chown "$app:$app" -R /var/log/"$app" + chmod u=rwX,g=rX,o= -R /var/log/"$app" # Criticals files - #REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app":root "$data_dir"/master_pwd - #REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod u=r,g=,o= "$data_dir"/master_pwd + chown "$app":root "$data_dir"/master_pwd + chmod u=r,g=,o= "$data_dir"/master_pwd chown "$app":root "$install_dir"/postgres-reg.ini chmod u=r,g=,o= "$install_dir"/postgres-reg.ini } diff --git a/tests.toml b/tests.toml index 89b5223..14ddeab 100644 --- a/tests.toml +++ b/tests.toml @@ -19,3 +19,4 @@ test_format = 1.0 test_upgrade_from.067601ed5bb19dde70f74a1fa1f6230a30efe6b5.name = "7.2~ynh1" test_upgrade_from.da90e7957a1a365f3c840df02c41cd14592030db.name = "Last packaging v1 version" test_upgrade_from.55a5fd67889da37d03a5d4614168db76a8817cdb.name = "Pre improvements" + test_upgrade_from.b1cd2eff160238a6059c9806b7301edc9edd8572.name = "Before helper 2.1"