20 lines
260 B
Bash
Executable file
20 lines
260 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
addgroup \
|
|
-S \
|
|
$FTP_USER
|
|
|
|
adduser \
|
|
-D \
|
|
-G $FTP_USER \
|
|
-h /home/$FTP_USER \
|
|
-s /bin/false \
|
|
$FTP_USER
|
|
|
|
mkdir -p /home/$FTP_USER
|
|
chown -R $FTP_USER:$FTP_USER /home/$FTP_USER
|
|
echo "$FTP_USER:$FTP_PASS" | /usr/sbin/chpasswd
|
|
|
|
exec "$@"
|