mirror of
https://github.com/YunoHost-Apps/dolibarr_ynh.git
synced 2024-09-03 18:35:53 +02:00
set version upgrade to the last one
optimize hook
This commit is contained in:
parent
1f96a65017
commit
b4f0edce7c
4 changed files with 12 additions and 14 deletions
|
@ -1,10 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
app=__APP__
|
app="$(basename $0 | cut -d- -f 2-)" # Extract the app name from the script name, which is supposed to be something like "50-app_id"
|
||||||
src_path=__FINALPATH__
|
src_path=$(yunohost app setting $app final_path)
|
||||||
# member=__MEMBER__
|
# member=__MEMBER__
|
||||||
|
|
||||||
# Sync users
|
# Sync users
|
||||||
if sudo php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y; then
|
if sudo php "$src_path/scripts/user/sync_users_ldap2dolibarr.php" commitiferror --server=localhost -y; then
|
||||||
echo ldap user update ok
|
echo ldap user update ok
|
||||||
else
|
else
|
||||||
echo ldap user update ended with error
|
echo ldap user update ended with error
|
||||||
|
@ -13,7 +13,7 @@ fi
|
||||||
# If YNH users should also be members, sync members
|
# If YNH users should also be members, sync members
|
||||||
# if [ $member -eq 1 ];
|
# if [ $member -eq 1 ];
|
||||||
# then
|
# then
|
||||||
# if sudo php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y; then
|
# if sudo php "$src_path/scripts/members/sync_members_ldap2dolibarr.php" commitiferror 1 --server=localhost -y; then
|
||||||
# echo ldap member update ok
|
# echo ldap member update ok
|
||||||
# else
|
# else
|
||||||
# echo ldap member update ended with error
|
# echo ldap member update ended with error
|
||||||
|
|
|
@ -227,14 +227,6 @@ ynh_permission_update --permission="main" --remove="visitors"
|
||||||
ynh_script_progression --message="configuring config file" --weight=1
|
ynh_script_progression --message="configuring config file" --weight=1
|
||||||
ynh_replace_string --match_string="dolibarr_main_authentication='dolibarr'" --replace_string="dolibarr_main_authentication='http'" --target_file="$final_path/htdocs/conf/conf.php"
|
ynh_replace_string --match_string="dolibarr_main_authentication='dolibarr'" --replace_string="dolibarr_main_authentication='http'" --target_file="$final_path/htdocs/conf/conf.php"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CONFIGURE THE HOOK FILE FOR USER CREATE
|
|
||||||
#=================================================
|
|
||||||
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="__FINALPATH__" --replace_string="$final_path" --target_file="$fhook"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -274,6 +274,12 @@ EOF
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if php$phpversion $final_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y; then
|
||||||
|
ynh_print_info --message="LDAP user update ok"
|
||||||
|
else
|
||||||
|
ynh_print_info --message="LDAP user update ended with error"
|
||||||
|
fi
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=version --value=$update_version
|
ynh_app_setting_set --app=$app --key=version --value=$update_version
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Target version of the Dolibarr update
|
# Target version of the Dolibarr update
|
||||||
next_version="16.0.0"
|
next_version="16.0.3"
|
||||||
|
|
||||||
# Dolibarr tarball checksum
|
# Dolibarr tarball checksum
|
||||||
dolibarr_source_sha256="76a642d74cd3e4fe86fdeccffacd0fa2b22a398dc03e7ad92edb34d033b17b2f"
|
dolibarr_source_sha256="52010375412c780b378145633a4e18abf6bde4c8e89a4cc1ad56d98fcd6120fd"
|
Loading…
Add table
Reference in a new issue