diff --git a/scripts/install b/scripts/install index e799ba9..323905a 100644 --- a/scripts/install +++ b/scripts/install @@ -177,14 +177,14 @@ ynh_mysql_connect_as --user=$app --password="$db_pwd" --database=$db_name < ../c case $language in fr) ynh_script_progression --message="Installing French extension..." --weight=2 - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\" activate_flarum_extension $db_name "qiaeru-lang-french" sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name ;; de) ynh_script_progression --message="Installing German extension..." --weight=2 - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\" activate_flarum_extension $db_name "cbmainz-de" sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root --sql="$sql_command" --database=$db_name diff --git a/scripts/upgrade b/scripts/upgrade index 1f14995..7a8f24e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -73,7 +73,7 @@ fi # Remove SSOwat if it exists ssowat_extension=$(ynh_app_setting_get --app=$app --key=ssowat_extension) if [ ! -z "$ssowat_extension" ]; then - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"remove tituspijean/flarum-ext-auth-ssowat\" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"remove tituspijean/flarum-ext-auth-ssowat\" ynh_app_setting_delete --app=$app --key=ssowat_extension fi @@ -181,13 +181,13 @@ then chown -R $app:www-data $final_path # Install Composer and Flarum - ynh_exec_warn_less ynh_install_composer --user=$app --phpversion=$phpversion --workdir=$final_path + ynh_exec_warn_less ynh_install_composer --phpversion=$phpversion --workdir=$final_path # Perform migrations and clear cache pushd $final_path ynh_script_progression --message="Upgrading Flarum and its extensions..." --weight=1 - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ldap:$ldap_version --no-update\" - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies\" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require tituspijean/flarum-ext-auth-ldap:$ldap_version --no-update\" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require flarum/core:$core_version --prefer-dist --update-no-dev -a --update-with-all-dependencies\" exec_as $app php$phpversion flarum migrate exec_as $app php$phpversion flarum cache:clear popd @@ -209,14 +209,14 @@ fi case $language in fr) ynh_script_progression --message="Installing French extension..." --weight=2 - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require qiaeru/lang-french\" activate_flarum_extension $db_name "qiaeru-lang-french" sql_command="UPDATE \`settings\` SET \`value\` = 'fr' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root "$sql_command" $db_name ;; de) ynh_script_progression --message="Installing German extension..." --weight=2 - ynh_exec_warn_less ynh_composer_exec --user=$app --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\" + ynh_exec_warn_less ynh_composer_exec --phpversion=$phpversion --workdir=$final_path --commands=\"require cbmainz/flarum-de\" activate_flarum_extension $db_name "cbmainz-de" sql_command="UPDATE \`settings\` SET \`value\` = 'de' WHERE \`settings\`.\`key\` = 'default_locale'" ynh_mysql_execute_as_root "$sql_command" $db_name