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:
parent
2dc2b82a85
commit
2e21294133
2 changed files with 6 additions and 14 deletions
|
@ -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/webtrees.sql"
|
||||||
ynh_mysql_db_shell < "$install_dir/admin.sql"
|
ynh_mysql_db_shell < "$install_dir/admin.sql"
|
||||||
|
|
||||||
ynh_secure_remove --file="$install_dir/webtrees.sql"
|
ynh_safe-rm --file="$install_dir/webtrees.sql"
|
||||||
ynh_secure_remove --file="$install_dir/admin.sql"
|
ynh_safe-rm --file="$install_dir/admin.sql"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SYSTEM CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
|
|
|
@ -9,26 +9,18 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_script_progression "Ensuring downward compatibility..."
|
ynh_script_progression "Ensuring downward compatibility..."
|
||||||
|
|
||||||
# Migrate manifest questions
|
# Migrate manifest questions
|
||||||
if [ -z "${admin_username:-}" ]; then
|
ynh_app_setting_set_default --key=admin_username --value=$username
|
||||||
admin_username="$username"
|
ynh_app_setting_set_default --key=admin_name --value=$name
|
||||||
ynh_app_setting_set --app="$app" --key="admin_username" --value="$admin_username"
|
ynh_app_setting_set_default --key=admin_email --value=$email
|
||||||
fi
|
|
||||||
if [ -n "${username:-}" ]; then
|
if [ -n "${username:-}" ]; then
|
||||||
ynh_app_setting_delete --app="$app" --key="username"
|
ynh_app_setting_delete --app="$app" --key="username"
|
||||||
fi
|
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
|
if [ -n "${name:-}" ]; then
|
||||||
ynh_app_setting_delete --app="$app" --key="name"
|
ynh_app_setting_delete --app="$app" --key="name"
|
||||||
fi
|
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
|
if [ -n "${email:-}" ]; then
|
||||||
ynh_app_setting_delete --app="$app" --key="email"
|
ynh_app_setting_delete --app="$app" --key="email"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue