From 3c3e13b46acc3ab5fe20ce4ef9497315da1e6a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josu=C3=A9=20Tille?= Date: Sat, 31 Aug 2024 11:05:29 +0200 Subject: [PATCH] Cleanup after auto patch --- scripts/_common.sh | 8 ++++---- scripts/upgrade | 6 +++--- tests.toml | 1 + 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index dcf7ee2..48027fe 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -64,11 +64,11 @@ set_permissions() { chown -R "$app:$app" "/etc/$app" chmod -R u=rwX,g=rX,o= "/etc/$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 | chown -R "$app:$app" "/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 -R u=rwX,g=rX,o= "/var/log/$app" + chown -R "$app:$app" "/var/log/$app" + chmod -R u=rwX,g=rX,o= "/var/log/$app" - #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 root: "/etc/cron.d/$app" - #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 644 "/etc/cron.d/$app" + chown root: "/etc/cron.d/$app" + chmod 644 "/etc/cron.d/$app" } is_url_handled() { diff --git a/scripts/upgrade b/scripts/upgrade index 3a3dc72..b14887b 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,9 +12,9 @@ ynh_script_progression "Ensuring downward compatibility..." ynh_script_progression "Migrating database if needed..." if ynh_app_upgrading_from_version_before_or_equal_to 4.0.0~ynh0; then - ynh_replace --match __APP__ --replace $app --file migrations/3.2-4.0.sh - ynh_replace --match __DBUSER__ --replace $db_user --file migrations/3.2-4.0.sh - ynh_replace --match __DBPASS__ --replace $db_pwd --file migrations/3.2-4.0.sh + ynh_replace --match=__APP__ --replace="$app" --file=migrations/3.2-4.0.sh + ynh_replace --match=__DBUSER__ --replace="$db_user" --file=migrations/3.2-4.0.sh + ynh_replace --match=__DBPASS__ --replace="$db_pwd" --file=migrations/3.2-4.0.sh bash migrations/3.2-4.0.sh fi diff --git a/tests.toml b/tests.toml index 99fb3c9..9402fbb 100644 --- a/tests.toml +++ b/tests.toml @@ -7,3 +7,4 @@ test_format = 1.0 test_upgrade_from.cc07f5da79498ef948c31a99f6ace9ad0a5b9ec1.name = "Before group permission support" test_upgrade_from.2fc174c57586df38506a07195decb08eed02f55f.name = "Before refactoring" test_upgrade_from.732e6d2962ed7e0fb9cb7a807e2b095adeab35c3.name = "last packagingv1 version" + test_upgrade_from.e3bb393e5e40ddb2a3c01cfc23b9f43f27f4ff27.name = "Before helper 2.1"