Add USE_SFTP option to rsync_xfer to just use sftp install of sshfs to copy files over to zmrepo
This commit is contained in:
parent
3db9375af2
commit
af6ead60a5
12
.travis.yml
12
.travis.yml
|
@ -35,12 +35,12 @@ env:
|
|||
- SMPFLAGS=-j4 OS=el DIST=7
|
||||
- SMPFLAGS=-j4 OS=fedora DIST=28 DOCKER_REPO=knnniggett/packpack
|
||||
- SMPFLAGS=-j4 OS=fedora DIST=29 DOCKER_REPO=knnniggett/packpack
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=trusty DOCKER_REPO=iconzm/packpack
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=xenial DOCKER_REPO=iconzm/packpack
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=bionic DOCKER_REPO=iconzm/packpack
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=disco DOCKER_REPO=iconzm/packpack
|
||||
- SMPFLAGS=-j4 OS=debian DIST=buster DOCKER_REPO=iconzm/packpack
|
||||
- SMPFLAGS=-j4 OS=debian DIST=stretch DOCKER_REPO=iconzm/packpack
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=trusty DOCKER_REPO=iconzm/packpack USE_SFTP=yes
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=xenial DOCKER_REPO=iconzm/packpack USE_SFTP=yes
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=bionic DOCKER_REPO=iconzm/packpack USE_SFTP=yes
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=disco DOCKER_REPO=iconzm/packpack USE_SFTP=yes
|
||||
- SMPFLAGS=-j4 OS=debian DIST=buster DOCKER_REPO=iconzm/packpack USE_SFTP=yes
|
||||
- SMPFLAGS=-j4 OS=debian DIST=stretch DOCKER_REPO=iconzm/packpack USE_SFTP=yes
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=trusty ARCH=i386
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=xenial ARCH=i386
|
||||
- SMPFLAGS=-j4 OS=ubuntu DIST=bionic ARCH=i386
|
||||
|
|
|
@ -25,7 +25,21 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${OS}" == "debian" ] || [ "${OS}"
|
|||
echo
|
||||
echo "Target subfolder set to $targetfolder"
|
||||
echo
|
||||
|
||||
if [ "${USE_SFTP}" == "yes" ]; then
|
||||
results="$(sftp build/* "zmrepo@zmrepo.zoneminder.com:${targetfolder}/" 2>&1)"
|
||||
if [ -z "$results" ]; then
|
||||
echo
|
||||
echo "Files copied successfully."
|
||||
echo
|
||||
else
|
||||
echo
|
||||
echo "ERROR: Attempt to mount zmrepo.zoneminder.com failed!"
|
||||
echo "sshfs gave the following error message:"
|
||||
echo \"$results\"
|
||||
echo
|
||||
exit 99
|
||||
fi
|
||||
else
|
||||
mkdir -p ./zmrepo
|
||||
ssh_mntchk="$(sshfs zmrepo@zmrepo.zoneminder.com:./ ./zmrepo -o workaround=rename,reconnect 2>&1)"
|
||||
|
||||
|
@ -48,3 +62,4 @@ if [ "${TRAVIS_EVENT_TYPE}" == "cron" ] || [ "${OS}" == "debian" ] || [ "${OS}"
|
|||
exit 99
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue