diff --git a/roles/samba-dc/files/sysvolsync.sh b/roles/samba-dc/files/sysvolsync.sh index 6575e08..4fd91e3 100644 --- a/roles/samba-dc/files/sysvolsync.sh +++ b/roles/samba-dc/files/sysvolsync.sh @@ -64,7 +64,7 @@ debug "Copying idmap.ldb from ${pdc}" rsync -a${DEBUG+i} --delete "${pdc}:${IDMAP_LDB}.bak" "${IDMAP_LDB}.new" st_new=$(stat -c %Y "${IDMAP_LDB}.new") st_cur=$(stat -c %Y "${IDMAP_LDB}") -if [ "${st_new}" -ne "${st_cur}" ]; then +if [ -z "${st_cur}" ] || [ "${st_new}" != "${st_cur}" ]; then info "Got updated idmap.ldb from ${pdc}" info 'Stopping Samba service' systemctl stop samba || exit