1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/webtrees_ynh.git synced 2024-09-03 18:26:37 +02:00

fixes some helpers_v2 stuffs

This commit is contained in:
Thomas 2024-07-02 11:00:55 +02:00 committed by GitHub
parent 2dc2b82a85
commit 2e21294133
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 14 deletions

View file

@ -40,8 +40,8 @@ ynh_config_add --template="sql/admin.sql" --destination="$install_dir/admin.sql"
ynh_mysql_db_shell < "$install_dir/webtrees.sql"
ynh_mysql_db_shell < "$install_dir/admin.sql"
ynh_secure_remove --file="$install_dir/webtrees.sql"
ynh_secure_remove --file="$install_dir/admin.sql"
ynh_safe-rm --file="$install_dir/webtrees.sql"
ynh_safe-rm --file="$install_dir/admin.sql"
#=================================================
# SYSTEM CONFIGURATION

View file

@ -9,26 +9,18 @@ source /usr/share/yunohost/helpers
ynh_script_progression "Ensuring downward compatibility..."
# Migrate manifest questions
if [ -z "${admin_username:-}" ]; then
admin_username="$username"
ynh_app_setting_set --app="$app" --key="admin_username" --value="$admin_username"
fi
ynh_app_setting_set_default --key=admin_username --value=$username
ynh_app_setting_set_default --key=admin_name --value=$name
ynh_app_setting_set_default --key=admin_email --value=$email
if [ -n "${username:-}" ]; then
ynh_app_setting_delete --app="$app" --key="username"
fi
if [ -z "${admin_name:-}" ]; then
admin_name="$name"
ynh_app_setting_set --app="$app" --key="admin_name" --value="$admin_name"
fi
if [ -n "${name:-}" ]; then
ynh_app_setting_delete --app="$app" --key="name"
fi
if [ -z "${admin_email:-}" ]; then
admin_email="$email"
ynh_app_setting_set --app="$app" --key="admin_email" --value="$admin_email"
fi
if [ -n "${email:-}" ]; then
ynh_app_setting_delete --app="$app" --key="email"
fi