1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dolibarr_ynh.git synced 2024-09-03 18:35:53 +02:00
dolibarr_ynh/hooks/post_user_create
2018-02-06 17:44:27 +01:00

13 lines
406 B
Bash

#!/bin/bash
app=YNH_APP
src_path=/var/www/$app
user=YNH_USER
member=YNH_MEMBER
# Sync users
sudo -u www-data php $src_path/scripts/user/sync_users_ldap2dolibarr.php commitiferror --server=localhost -y
# If YNH users should also be members, sync members
if [ $member = 1 ] ; then
sudo sudo -u www-data php $src_path/scripts/members/sync_members_ldap2dolibarr.php commitiferror 1 --server=localhost -y
fi