37 lines
936 B
Bash
Executable File
37 lines
936 B
Bash
Executable File
#!/bin/sh
|
|
|
|
############ MASQUERADE
|
|
MASQUERADE=${MASQUERADE:-127.0.0.1}
|
|
echo "MasqueradeAddress ${MASQUERADE}" > /etc/proftpd/conf.d/masquerade.conf
|
|
|
|
############ AUTH
|
|
[ ! -f /auth/passwd ] && touch /auth/passwd
|
|
chmod 0600 /auth/passwd
|
|
chmod 0700 /auth
|
|
|
|
############ PASSIVE PORTS
|
|
PASSIVEPORTS_START=${PASSIVEPORTS_START:-50000}
|
|
PASSIVEPORTS_END=${PASSIVEPORTS_END:-50050}
|
|
echo "PassivePorts ${PASSIVEPORTS_START} ${PASSIVEPORTS_END}" > /etc/proftpd/conf.d/passive_ports.conf
|
|
|
|
############ MAX CLIENTS
|
|
MAXCLIENTS=${MAXCLIENTS:-30}
|
|
MAXCLIENTSPERHOST=${MAXCLIENTSPERHOST:-5}
|
|
echo "Maxclients ${MAXCLIENTS}" > /etc/proftpd/conf.d/maxclients.conf
|
|
echo "MaxClientsPerHost ${MAXCLIENTSPERHOST}" >> /etc/proftpd/conf.d/maxclients.conf
|
|
|
|
############ CERT INIT
|
|
ENABLE_ACME=${ENABLE_ACME:-no}
|
|
|
|
if [ "$ENABLE_ACME" = "1" ] ; then
|
|
/app/acme-cert-init.sh
|
|
else
|
|
/app/cert-init.sh
|
|
fi
|
|
|
|
############ START CRON
|
|
crond -b
|
|
|
|
############ START
|
|
proftpd -n
|