Add ability to set passive address
This commit is contained in:
9
entry.sh
9
entry.sh
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user