1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mediawiki_ynh.git synced 2024-09-03 19:46:05 +02:00

Fix: install LocalSettings file on upgrade too

This commit is contained in:
Félix Piédallu 2023-09-15 16:27:26 +02:00 committed by Salamandar
parent 935c4eb2fc
commit 4de12136b6
2 changed files with 6 additions and 2 deletions

View file

@ -70,8 +70,6 @@ else
mediawiki_path="$path" mediawiki_path="$path"
fi fi
wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}"
pushd "$install_dir" || ynh_die "Could not pushd $install_dir" pushd "$install_dir" || ynh_die "Could not pushd $install_dir"
"php$phpversion" "$install_dir/maintenance/install.php" \ "php$phpversion" "$install_dir/maintenance/install.php" \
--server "https://$domain" \ --server "https://$domain" \
@ -93,6 +91,8 @@ ynh_script_progression --message="Adding a configuration file..."
# save the original LocalSettings.php for eventual debugging # save the original LocalSettings.php for eventual debugging
mv "$install_dir/LocalSettings.php" "$install_dir/LocalSettings.php.orig" mv "$install_dir/LocalSettings.php" "$install_dir/LocalSettings.php.orig"
wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}"
ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php" ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php"
# This is required to update database schemas # This is required to update database schemas

View file

@ -103,6 +103,10 @@ else
mediawiki_path="$path" mediawiki_path="$path"
fi fi
wiki_name_underscorified="${wiki_name//[^a-zA-Z0-9]/_}"
ynh_add_config --template="../conf/LocalSettings.php" --destination="$install_dir/LocalSettings.php"
# Check for admin password being too short for the new mediawiki requirements # Check for admin password being too short for the new mediawiki requirements
password_length=$(ynh_app_setting_get --app=$app --key=password | awk '{print length}') password_length=$(ynh_app_setting_get --app=$app --key=password | awk '{print length}')
if (( password_length < 10 )); then if (( password_length < 10 )); then