Make use of the new RSYNC_PORT env var.

This commit is contained in:
Wayne Davison
2020-04-07 13:29:29 -07:00
parent 795268bb7c
commit 9dea2ae87c

View File

@@ -16,14 +16,19 @@ if [ x"$RSYNC_SSL_CERT" = x ]; then
else
cert="cert = $RSYNC_SSL_CERT"
fi
if [ x"$RSYNC_SSL_CA_CERT" ]; then
if [ x"$RSYNC_SSL_CA_CERT" = x ]; then
cafile=""
verify=0
else
cafile="CAfile = $RSYNC_SSL_CA_CERT"
verify=3
fi
port=${RSYNC_SSL_PORT:-874}
port="${RSYNC_PORT:-0}"
if [ "$port" = 0 ]; then
port="${RSYNC_SSL_PORT:-874}"
fi
# If the user specified USER@HOSTNAME::module, then rsync passes us
# the -l USER option too, so we must be prepared to ignore it.