ftp/.travis/prepare.sh

32 lines
743 B
Bash
Raw Normal View History

#!/bin/sh -e
2017-08-11 14:28:41 +02:00
mkdir --mode 0777 -p /var/ftp/incoming
case "$1" in
proftpd)
mkdir -p /etc/proftpd/conf.d/
cp $TRAVIS_BUILD_DIR/.travis/proftpd.conf /etc/proftpd/conf.d/
2017-08-11 14:28:41 +02:00
apt-get install -qq "$1"
;;
vsftpd)
cp $TRAVIS_BUILD_DIR/.travis/vsftpd.conf /etc/vsftpd.conf
2017-08-11 14:28:41 +02:00
apt-get install -qq "$1"
;;
vsftpd_implicit_tls)
openssl req \
-new \
-newkey rsa:1024 \
-days 365 \
-nodes \
-x509 \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost" \
-keyout /etc/ssl/certs/vsftpd.pem \
-out /etc/ssl/certs/vsftpd.pem
cp $TRAVIS_BUILD_DIR/.travis/vsftpd_implicit_tls.conf /etc/vsftpd.conf
apt-get install -qq vsftpd
;;
*)
echo "unknown software: $1"
exit 1
esac