Fix rsync session terminating
This commit is contained in:
parent
66e3839f55
commit
bfcdf48381
|
@ -36,8 +36,10 @@ if $(echo "${SSH_ORIGINAL_COMMAND}" | grep -q "^\(internal-sftp\|/usr/lib/ssh/sf
|
||||||
[ -x /opt/libexec/sftp-server ] && exec /opt/libexec/sftp-server -R
|
[ -x /opt/libexec/sftp-server ] && exec /opt/libexec/sftp-server -R
|
||||||
else
|
else
|
||||||
RSYNC=/usr/bin/rsync
|
RSYNC=/usr/bin/rsync
|
||||||
[ ! -x $RSYNC ] && [ -x /opt/bin/rsync ] && RSYNC=/opt/bin/rsync
|
RSYNC_OPTS="--server --daemon --config='$home_dir/rsync.conf' ."
|
||||||
exec $RSYNC --server --daemon --config="${home_dir}/rsync.conf"
|
[ -x $RSYNC ] && exec $RSYNC $(eval echo $RSYNC_OPTS)
|
||||||
|
RSYNC=/opt/bin/rsync
|
||||||
|
[ -x $RSYNC ] && exec $RSYNC $(eval echo $RSYNC_OPTS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Session failed." >&2
|
echo "Session failed." >&2
|
||||||
|
|
Loading…
Reference in New Issue