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

install on root and change_url are now working

This commit is contained in:
toitoinebzh 2019-02-28 22:45:05 +01:00
parent aae3dd5cc8
commit 652d94def8
2 changed files with 29 additions and 4 deletions

View file

@ -96,9 +96,28 @@ fi
#=================================================
# ======= modif perso =======
ynh_replace_string "\$wgServer = \"https://$old_domain\";"
"\$wgServer = \"https://$new_domain\";" "$final_path/LocalSettings.php"
ynh_replace_string "\$wgScriptPath = \"$old_path\";" "\$wgScriptPath = \"$new_path\";" "$final_path/LocalSettings.php"
# change domain
if [ $change_domain -eq 1 ]
then
ynh_replace_string "\$wgServer = \"https://$old_domain\";" "\$wgServer = \"https://$new_domain\";" "$final_path/LocalSettings.php"
fi
# change path
if [ $change_path -eq 1 ]
then
if [ "$old_path" = "/" ]; then
old_scriptpath=""
else
old_scriptpath=$old_path
fi
if [ "$new_path" = "/" ]; then
new_scriptpath=""
else
new_scriptpath=$new_path
fi
ynh_replace_string "\$wgScriptPath = \"$old_scriptpath\";" "\$wgScriptPath = \"$new_scriptpath\";" "$final_path/LocalSettings.php"
fi
# ======= modif perso =======
#=================================================

View file

@ -250,9 +250,15 @@ fi
#php $final_path/maintenance/update.php
if [ "$path_url" = "/" ]; then
scriptpath=""
else
scriptpath=$path_url
fi
php $final_path/maintenance/install.php --conf $final_path \
--server "https://$domain" \
--scriptpath $path_url \
--scriptpath "$scriptpath" \
--dbuser $db_name \
--dbpass $db_pwd \
--dbname $db_name \