1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/spip_ynh.git synced 2024-09-03 20:25:59 +02:00

Fix the upgrade from old version

This commit is contained in:
Kayou 2019-03-10 20:13:09 +01:00
parent 4470c7ec78
commit c57a02635c
No known key found for this signature in database
GPG key ID: 823A2CBE071D3126
2 changed files with 16 additions and 2 deletions

View file

@ -140,7 +140,7 @@ ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap5" "adresse_ldap=loc
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "ldap_present=true"
email=$(yunohost user info $admin | grep mail: | cut -d' ' -f2 | tr -d '\n')
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=$email" "login=$admin" "pass=$password" "pass_verif=$password"
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=\"$email\"" "login=$admin" "pass=$password" "pass_verif=$password"
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
# Remove the public access

View file

@ -40,6 +40,12 @@ elif [ "$is_public" = "No" ]; then
is_public=0
fi
# If db_name doesn't exist, create it
if [ -z $db_name ]; then
db_name=$app
ynh_app_setting_set $app db_name $db_name
fi
# If final_path doesn't exist, create it
if [ -z $final_path ]; then
final_path=/var/www/$app
@ -158,7 +164,7 @@ ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=ldap5" "adresse_ldap=loc
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3" "ldap_present=true"
email=$(yunohost user info $admin | grep mail: | cut -d' ' -f2 | tr -d '\n')
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=$email" "login=$admin" "pass=$password" "pass_verif=$password"
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=3b" "adresse_db=localhost" "login_db=$db_name" "pass_db=$db_pwd" "server_db=mysql" "sel_db=$db_name" "nom=$admin" "email=\"$email\"" "login=$admin" "pass=$password" "pass_verif=$password"
ynh_local_curl "/ecrire/?suivant" "exec=install" "etape=fin"
# Remove the public access
@ -201,6 +207,14 @@ ynh_print_info "Reloading nginx web server..."
systemctl reload nginx
#=================================================
# SEND INFORMATION
#=================================================
echo "To finish the upgrade, you may have to update the database by clicking on the button (if asked) at this location: https://$domain$path_url/ecrire/" > mail_to_send
ynh_send_readme_to_admin --app_message="mail_to_send" --type="upgrade"
#=================================================
# END OF SCRIPT
#=================================================