mirror of
https://github.com/YunoHost-Apps/dolibarr_ynh.git
synced 2024-09-03 18:35:53 +02:00
Merge pull request #53 from YunoHost-Apps/testing
Update script and version to 13.0.2
This commit is contained in:
commit
b56d8c0397
7 changed files with 23 additions and 47 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:** 12.0.5
|
**Shipped version:** 13.0.2
|
||||||
|
|
||||||
## 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 :** 12.0.5
|
**Version incluse :** 13.0.2
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="/path" (PATH)
|
path="/path" (PATH)
|
||||||
admin="john" (USER)
|
admin="john" (USER)
|
||||||
member=0
|
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
|
@ -17,17 +16,6 @@
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
change_url=1
|
change_url=1
|
||||||
;; Test member to true
|
|
||||||
; Manifest
|
|
||||||
domain="domain.tld" (DOMAIN)
|
|
||||||
path="/path" (PATH)
|
|
||||||
admin="john" (USER)
|
|
||||||
member=1
|
|
||||||
; Checks
|
|
||||||
setup_sub_dir=1
|
|
||||||
setup_root=1
|
|
||||||
upgrade=1
|
|
||||||
backup_restore=1
|
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/12.0.5.tar.gz
|
SOURCE_URL=https://github.com/Dolibarr/dolibarr/archive/13.0.2.tar.gz
|
||||||
SOURCE_SUM=b60b124ebcd294375f6200cc0683449e475b5dec687f8317b820fc8ec1413d21
|
SOURCE_SUM=2ae5d8ce487c939acc7085c1e69c416d20beb84e6cfeaee3b53b0389f9ee2d8f
|
||||||
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": "12.0.5~ynh1",
|
"version": "13.0.2~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": {
|
||||||
|
@ -51,15 +51,6 @@
|
||||||
"fr": "Choisissez l’administrateur"
|
"fr": "Choisissez l’administrateur"
|
||||||
},
|
},
|
||||||
"example": "johndoe"
|
"example": "johndoe"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "member",
|
|
||||||
"type": "boolean",
|
|
||||||
"ask": {
|
|
||||||
"en": "Add YunoHost users as members waiting for validation in Dolibarr ? (Useful mainly for associations)",
|
|
||||||
"fr": "Ajouter les utilisateurs YunoHost comme adhérents en attente de validation dans Dolibarr ? (Utile pour les associations)"
|
|
||||||
},
|
|
||||||
"default": false
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ ynh_abort_if_errors
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
admin=$YNH_APP_ARG_ADMIN
|
admin=$YNH_APP_ARG_ADMIN
|
||||||
member=$YNH_APP_ARG_MEMBER
|
member=0
|
||||||
is_public=0
|
is_public=0
|
||||||
|
|
||||||
app=$YNH_APP_INSTANCE_NAME
|
app=$YNH_APP_INSTANCE_NAME
|
||||||
|
@ -48,6 +48,7 @@ ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||||
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
ynh_app_setting_set --app=$app --key=admin --value=$admin
|
||||||
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
|
||||||
|
ynh_app_setting_set --app=$app --key=member --value=$member
|
||||||
ynh_app_setting_set --app=$app --key=version --value=$(ynh_app_upstream_version "../manifest.json")
|
ynh_app_setting_set --app=$app --key=version --value=$(ynh_app_upstream_version "../manifest.json")
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -118,18 +119,15 @@ ynh_add_nginx_config
|
||||||
finstall="$final_path/htdocs/install/install.forced.php"
|
finstall="$final_path/htdocs/install/install.forced.php"
|
||||||
cp ../conf/install.forced.php "$finstall"
|
cp ../conf/install.forced.php "$finstall"
|
||||||
|
|
||||||
# Change variables in Wordpress configuration
|
# Change variables in Dolibarr configuration
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$finstall"
|
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$finstall"
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$finstall"
|
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_user" --target_file="$finstall"
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$finstall"
|
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$finstall"
|
||||||
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$finstall"
|
ynh_replace_string --match_string="__ADMIN__" --replace_string="$admin" --target_file="$finstall"
|
||||||
if [ $member -eq 1 ]
|
|
||||||
then
|
|
||||||
# If YNH users are members, we must activate the members module
|
|
||||||
ynh_replace_string --match_string="modLdap" --replace_string="modLdap,modAdherent" --target_file="$finstall"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup hooks
|
#=================================================
|
||||||
|
# CONFIGURE THE HOOK FILE FOR USER CREATE
|
||||||
|
#=================================================
|
||||||
fhook=../hooks/post_user_create
|
fhook=../hooks/post_user_create
|
||||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$fhook"
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$fhook"
|
||||||
ynh_replace_string --match_string="__MEMBER__" --replace_string="$member" --target_file="$fhook"
|
ynh_replace_string --match_string="__MEMBER__" --replace_string="$member" --target_file="$fhook"
|
||||||
|
@ -196,18 +194,6 @@ else
|
||||||
ynh_print_warn --message="LDAP user update ended with error"
|
ynh_print_warn --message="LDAP user update ended with error"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If YNH users should be members, populate the database accordingly, create the member list, and sync members
|
|
||||||
if [ $member -eq 1 ]
|
|
||||||
then
|
|
||||||
ynh_mysql_connect_as --user=$db_name --password=$db_pwd --database=$db_name < ../conf/sql/ldap_member.sql
|
|
||||||
|
|
||||||
if php $final_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y; then
|
|
||||||
ynh_print_info --message="LDAP member update ok"
|
|
||||||
else
|
|
||||||
ynh_print_warn --message="LDAP member update ended with error"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||||
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
admin=$(ynh_app_setting_get --app=$app --key=admin)
|
||||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||||
|
member=$(ynh_app_setting_get --app=$app --key=member)
|
||||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
language=$(ynh_app_setting_get --app=$app --key=language)
|
language=$(ynh_app_setting_get --app=$app --key=language)
|
||||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||||
|
@ -212,6 +213,16 @@ ynh_script_progression --message="Upgrading logrotate configuration..." --weight
|
||||||
# Use logrotate to manage app-specific logfile(s)
|
# Use logrotate to manage app-specific logfile(s)
|
||||||
ynh_use_logrotate --non-append
|
ynh_use_logrotate --non-append
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPDATE THE HOOK FILE FOR USER CREATE
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# Set system group in hooks
|
||||||
|
fhook=../hooks/post_user_create
|
||||||
|
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$fhook"
|
||||||
|
ynh_replace_string --match_string="__MEMBER__" --replace_string="$member" --target_file="$fhook"
|
||||||
|
ynh_replace_string --match_string="__SRCPATH__" --replace_string="$final_path" --target_file="$fhook"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue