From 78ceac07cefb8ebe2fd900d930b186774f4d8227 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 27 Aug 2022 09:16:31 +0200 Subject: [PATCH] Fix --- scripts/install | 2 ++ scripts/upgrade | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/scripts/install b/scripts/install index 64e61da..823f0d3 100755 --- a/scripts/install +++ b/scripts/install @@ -35,6 +35,7 @@ feed_title="Feed title" feed_description="Feed description" author_name="Author Name" author_email="author@somewhere.example" +copyright_text="Copyright Text" #================================================= # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS @@ -59,6 +60,7 @@ ynh_app_setting_set --app=$app --key=feed_title --value=$feed_title ynh_app_setting_set --app=$app --key=feed_description --value=$feed_description ynh_app_setting_set --app=$app --key=author_name --value=$author_name ynh_app_setting_set --app=$app --key=author_email --value=$author_email +ynh_app_setting_set --app=$app --key=copyright_text --value=$copyright_text #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index 5dbd4de..a53e119 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,6 +25,7 @@ feed_title=$(ynh_app_setting_get --app=$app --key=feed_title) feed_description=$(ynh_app_setting_get --app=$app --key=feed_description) author_name=$(ynh_app_setting_get --app=$app --key=author_name) author_email=$(ynh_app_setting_get --app=$app --key=author_email) +copyright_text=$(ynh_app_setting_get --app=$app --key=copyright_text) #================================================= # CHECK VERSION @@ -90,6 +91,13 @@ if [ -z "$author_email" ]; then ynh_app_setting_set --app=$app --key=author_email --value=$author_email fi +# If copyright_text doesn't exist, create it +if [ -z "$copyright_text" ]; then + copyright_text="Copyright Text" + ynh_app_setting_set --app=$app --key=copyright_text --value=$copyright_text +fi + + # Cleaning legacy permissions if ynh_legacy_permissions_exists; then ynh_legacy_permissions_delete_all