mirror of
https://github.com/YunoHost-Apps/dolibarr_ynh.git
synced 2024-09-03 18:35:53 +02:00
21 lines
933 B
Bash
21 lines
933 B
Bash
#!/bin/bash
|
|
app=dolibarr
|
|
src_path=/var/www/dolibarr
|
|
member=1
|
|
|
|
# Sync users
|
|
if sudo php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y; then
|
|
echo ldap user update ok
|
|
else
|
|
echo ldap user update ended with error
|
|
fi
|
|
|
|
# If YNH users should also be members, sync members
|
|
if [ $member -eq 1 ];
|
|
then
|
|
if sudo php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y; then
|
|
echo ldap member update ok
|
|
else
|
|
echo ldap member update ended with error
|
|
fi
|
|
fi
|