# Calculate chmod=0755 chown=root:root
#!/bin/bash

RSYNC_CONFIG_FILE="/tmp/rsync.$USER.$$"
cat >$RSYNC_CONFIG_FILE <<EOF
use chroot = false
read only = false

[profile]
    path = #-sr_samba_linprof_path-#/$USER
EOF

if ! /usr/bin/rsync --config $RSYNC_CONFIG_FILE --server --daemon .
then
	rm -f #-sr_samba_linprof_path-#/$USER/*/.logout
fi
rm -f $RSYNC_CONFIG_FILE
exit 0
