Add ability to set passive address

This commit is contained in:
Marc Huffnagle
2018-10-29 15:13:32 -04:00
parent cc1a8954ce
commit 01184880cd
2 changed files with 13 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# vsftpd container entrypoint script
# vsftpd container entrypoint script
set -e
@@ -27,6 +27,13 @@ if [[ ! -z "${FTP_USERS_ROOT}" ]]; then
sed -i 's/local_root=.*/local_root=\/srv\/$USER/' /etc/vsftpd*.conf
fi
# Support setting the passive address
if [[ ! -z "$FTP_PASV_ADDRESS" ]]; then
for f in /etc/vsftpd*.conf; do
echo "pasv_address=${FTP_PASV_ADDRESS}" >> "$f"
done
fi
# Manage /srv permissions
if [[ ! -z "${FTP_CHOWN_ROOT}" ]]; then
chown ftp:ftp /srv