. /usr/lib/lsb/init-functions

log_info_msg2 "${WARNING} To activate rsyncd, please pass ${INFO} systemctl enable --now rsyncd ${NORMAL}"
log_info_msg2 "${WARNING} A default conf file for the service will be copied if nothing presents in /etc/rsyncd.conf ${NORMAL}"

if [ ! -f etc/rsyncd.conf ]; then
	cat > etc/rsyncd.conf << "EOF"
# use chroot = yes
# [site]
#   path = /home/saravane/nutyx.org
#   comment = Site web
#   auth users = tnut
#   read only = yes
#   exclude from = /etc/saravane_rsync_exclude_files.txt
#   secrets file = /etc/rsyncd.secrets
EOF
fi
