mirror of
https://github.com/YunoHost-Apps/dolibarr_ynh.git
synced 2024-09-03 18:35:53 +02:00
Merge pull request #60 from YunoHost-Apps/testing
Update to 13.0.4 and fix database charset
This commit is contained in:
commit
0217ebe3cf
6 changed files with 38 additions and 10 deletions
|
@ -11,7 +11,7 @@ If you don't have YunoHost, please see [here](https://yunohost.org/#/install) to
|
||||||
## Overview
|
## Overview
|
||||||
Dolibarr ERP & CRM is a modern software for managing your professional or associative activity (contacts, invoices, orders, stocks, agenda, etc.).
|
Dolibarr ERP & CRM is a modern software for managing your professional or associative activity (contacts, invoices, orders, stocks, agenda, etc.).
|
||||||
|
|
||||||
**Shipped version:** 13.0.3
|
**Shipped version:** 13.0.4
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
## Vue d'ensemble
|
## Vue d'ensemble
|
||||||
Dolibarr ERP & CRM est un logiciel moderne de gestion de votre activité professionnelle ou associative (contacts, factures, commandes, stocks, agenda, etc.).
|
Dolibarr ERP & CRM est un logiciel moderne de gestion de votre activité professionnelle ou associative (contacts, factures, commandes, stocks, agenda, etc.).
|
||||||
|
|
||||||
**Version incluse :** 13.0.3
|
**Version incluse :** 13.0.4
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/13.0.3.tar.gz
|
SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/13.0.4.tar.gz
|
||||||
SOURCE_SUM=67d7c52c865ab5ea6a6d03ca3c23c82ed6e19cc2ff6d85788197fea81ebc9781
|
SOURCE_SUM=92bcfe7bd72e40b6fe9c40105bad9c67c61b23a9c78de5f03fd05d1e95959304
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Manage the various aspects of your business or association.",
|
"en": "Manage the various aspects of your business or association.",
|
||||||
"fr": "Gérez les différents aspects de votre activité pro ou associative."
|
"fr": "Gérez les différents aspects de votre activité pro ou associative."
|
||||||
},
|
},
|
||||||
"version": "13.0.3~ynh1",
|
"version": "13.0.4~ynh1",
|
||||||
"url": "https://www.dolibarr.org/",
|
"url": "https://www.dolibarr.org/",
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"maintainer": {
|
"maintainer": {
|
||||||
|
|
|
@ -63,6 +63,8 @@ db_user=$db_name
|
||||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||||
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
|
|
||||||
|
ynh_mysql_execute_as_root --sql="ALTER DATABASE $db_name charset=utf8"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -149,6 +151,9 @@ ynh_permission_update --permission="main" --add="visitors"
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
# Installation with curl
|
# Installation with curl
|
||||||
|
|
||||||
|
mkdir -p /var/log/$app/
|
||||||
|
|
||||||
ynh_script_progression --message="Finalizing installation..." --weight=1
|
ynh_script_progression --message="Finalizing installation..." --weight=1
|
||||||
|
|
||||||
ynh_script_progression --message="Generate fileconf" --weight=1
|
ynh_script_progression --message="Generate fileconf" --weight=1
|
||||||
|
@ -158,17 +163,17 @@ ynh_local_curl "/install/fileconf.php" \
|
||||||
ynh_script_progression --message="installation - step 1" --weight=3
|
ynh_script_progression --message="installation - step 1" --weight=3
|
||||||
ynh_local_curl "/install/step1.php" \
|
ynh_local_curl "/install/step1.php" \
|
||||||
"testpost=ok" \
|
"testpost=ok" \
|
||||||
"action=set"
|
"action=set" > /var/log/$app/install1.html
|
||||||
|
|
||||||
ynh_script_progression --message="installation - step 2 (may take a while)..." --weight=72
|
ynh_script_progression --message="installation - step 2 (may take a while)..." --weight=72
|
||||||
ynh_local_curl "/install/step2.php" \
|
ynh_local_curl "/install/step2.php" \
|
||||||
"testpost=ok" \
|
"testpost=ok" \
|
||||||
"action=set"
|
"action=set" > /var/log/$app/install2.html
|
||||||
|
|
||||||
ynh_script_progression --message="installation - step 4" --weight=3
|
ynh_script_progression --message="installation - step 4" --weight=3
|
||||||
ynh_local_curl "/install/step4.php" \
|
ynh_local_curl "/install/step4.php" \
|
||||||
"testpost=ok" \
|
"testpost=ok" \
|
||||||
"action=set"
|
"action=set" > /var/log/$app/install3.html
|
||||||
|
|
||||||
# Generate a random password for the admin user (will be ignored because of LDAP)
|
# Generate a random password for the admin user (will be ignored because of LDAP)
|
||||||
password=$(ynh_string_random 8)
|
password=$(ynh_string_random 8)
|
||||||
|
@ -178,7 +183,7 @@ ynh_local_curl "/install/step5.php" \
|
||||||
"testpost=ok" \
|
"testpost=ok" \
|
||||||
"action=set" \
|
"action=set" \
|
||||||
"pass=$password" \
|
"pass=$password" \
|
||||||
"pass_verif=$password"
|
"pass_verif=$password" > /var/log/$app/install4.html
|
||||||
|
|
||||||
ynh_script_progression --message="configuring LDAP" --weight=1
|
ynh_script_progression --message="configuring LDAP" --weight=1
|
||||||
|
|
||||||
|
|
|
@ -171,17 +171,34 @@ then
|
||||||
mkdir -p /var/log/$app/
|
mkdir -p /var/log/$app/
|
||||||
|
|
||||||
# Upgrade with CURL
|
# Upgrade with CURL
|
||||||
|
|
||||||
|
# Set the app as temporarily public for cURL call
|
||||||
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
|
|
||||||
pushd $final_path/htdocs/install/
|
pushd $final_path/htdocs/install/
|
||||||
if php$phpversion upgrade.php $current_version $update_version > /var/log/$app/upgrade.html; then
|
if php$phpversion upgrade.php $current_version $update_version > /var/log/$app/upgrade.html; then
|
||||||
ynh_print_info --message="Step 1 upgrading ended successfully"
|
ynh_print_info --message="Step 1 upgrading ended successfully"
|
||||||
else
|
else
|
||||||
ynh_print_warn --message="Step 1 upgrading ended with error"
|
ynh_print_warn --message="Step 1 upgrading ended with error"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if php$phpversion upgrade2.php $current_version $update_version > /var/log/$app/upgrade2.html; then
|
if php$phpversion upgrade2.php $current_version $update_version > /var/log/$app/upgrade2.html; then
|
||||||
ynh_print_info --message="Step 2 upgrading ended successfully"
|
ynh_print_info --message="Step 2 upgrading ended successfully"
|
||||||
else
|
else
|
||||||
ynh_print_warn --message="Step 2 upgrading ended with error"
|
ynh_print_warn --message="Step 2 upgrading ended with error"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
charset=$(mysql -ss -N -e "SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = '$db_name'")
|
||||||
|
if [ "$charset" != "utf8" ]
|
||||||
|
then
|
||||||
|
ynh_script_progression --message="Changing Database charset to utf8" --weight=5
|
||||||
|
|
||||||
|
ynh_mysql_execute_as_root --database=$db_name --sql="ALTER DATABASE $db_name charset=utf8"
|
||||||
|
|
||||||
|
ynh_local_curl "/install/repair.php" \
|
||||||
|
"force_utf8_on_tables=confirmed" > /var/log/$app/repair.html
|
||||||
|
fi
|
||||||
|
|
||||||
if php$phpversion step5.php $current_version $update_version > /var/log/$app/upgrade3.html; then
|
if php$phpversion step5.php $current_version $update_version > /var/log/$app/upgrade3.html; then
|
||||||
ynh_print_info --message="Step 3 upgrading ended successfully"
|
ynh_print_info --message="Step 3 upgrading ended successfully"
|
||||||
else
|
else
|
||||||
|
@ -191,6 +208,12 @@ then
|
||||||
ynh_app_setting_set --app=$app --key=version --value=$update_version
|
ynh_app_setting_set --app=$app --key=version --value=$update_version
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
if [ $is_public -eq 0 ]
|
||||||
|
then
|
||||||
|
ynh_permission_update --permission="main" --remove="visitors"
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue