1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tube_ynh.git synced 2024-09-04 01:46:11 +02:00
This commit is contained in:
ericgaspar 2022-08-27 09:16:31 +02:00
parent 1749903d6e
commit 78ceac07ce
2 changed files with 10 additions and 0 deletions

View file

@ -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

View file

@ -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