25 lines
489 B
Plaintext
25 lines
489 B
Plaintext
post_install() {
|
|
if ! getent group proftpd &>/dev/null; then
|
|
groupadd -r proftpd >& /dev/null
|
|
fi
|
|
if ! getent passwd proftpd &>/dev/null; then
|
|
useradd -r -d /var/lib/ftp -g proftpd -s /bin/false proftpd
|
|
usermod -aG ftp proftpd
|
|
fi
|
|
|
|
chown proftpd:proftpd /var/lib/ftp
|
|
}
|
|
|
|
post_upgrade() {
|
|
post_install $1
|
|
}
|
|
|
|
post_remove() {
|
|
if getent passwd proftpd &>/dev/null; then
|
|
userdel proftpd >/dev/null
|
|
fi
|
|
if getent group proftpd &>/dev/null; then
|
|
groupdel proftpd >/dev/null
|
|
fi
|
|
}
|