2017-04-24 04:16:02 +02:00
|
|
|
#!/bin/bash
|
2019-06-16 00:06:51 +02:00
|
|
|
app=dolibarr
|
|
|
|
src_path=/var/www/dolibarr
|
|
|
|
member=1
|
|
|
|
|
2017-05-05 17:34:15 +02:00
|
|
|
# Sync users
|
2019-06-16 00:06:51 +02:00
|
|
|
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
|
|
|
|
|
2017-05-05 17:34:15 +02:00
|
|
|
# If YNH users should also be members, sync members
|
2019-06-16 00:06:51 +02:00
|
|
|
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
|
2018-01-29 17:06:38 +01:00
|
|
|
fi
|