diff --git a/scripts/install b/scripts/install index c08544d..6a42658 100755 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,10 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= +ynh_clean_setup () { + ### Remove this function if there's nothing to clean before calling the remove script. + true +} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -115,7 +119,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) ynh_add_config --template="../conf/config.ini.php" --destination="$final_path/data/config.ini.php" # Load initial SQL into the new database -ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/sql/webtrees.sql" +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "../conf/sql/webtrees.sql" # Replace variables in sql scripts ynh_replace_string --match_string="__USER_NAME__" --replace_string="$admin_username" --target_file="../conf/sql/admin.sql" @@ -123,7 +127,7 @@ ynh_replace_string --match_string="__NAME__" --replace_string="$admin_name ynh_replace_string --match_string="__USER_EMAIL__" --replace_string="$admin_email" --target_file="../conf/sql/admin.sql" ynh_replace_string --match_string="__PASSWORD__" --replace_string="$admin_password" --target_file="../conf/sql/admin.sql" -ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/sql/admin.sql" +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < "../conf/sql/admin.sql" #================================================= # SETUP SSOWAT