summaryrefslogtreecommitdiff
path: root/examples/file-server/accept-files.sh
blob: c3f472e56864c1d0ae6f83a5511a01e7e9365fc1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# Accept files from remote users.

ROOT="/srv/tlsd/files"
USERDIR="${ROOT}/${ALIAS}"

if read -r LINE
then if   [ -d "${USERDIR}" ]
     then cat > "${USERDIR}/$(echo "${LINE}" | sed -e 's/\.\.//g')"
     else echo "No directory for you!"
     fi
fi