#! /bin/sh # postinst script for all pure-ftpd flavours . /usr/share/debconf/confmodule db_get pure-ftpd/ftpwho-setuid SUID="$RET" if [ ! -x /usr/sbin/dpkg-statoverride ] || \ ! dpkg-statoverride --list /usr/sbin/pure-ftpwho >/dev/null; then if [ "$SUID" = true ]; then chmod 4755 /usr/sbin/pure-ftpwho else chmod 0755 /usr/sbin/pure-ftpwho fi fi case "$0" in *mysql*) chmod 600 /etc/pure-ftpd/db/mysql.conf ;; *postgresql*) chmod 600 /etc/pure-ftpd/db/postgresql.conf ;; *ldap*) chmod 600 /etc/pure-ftpd/db/ldap.conf ;; esac # Automatically added by dh_installinit if [ -x "/etc/init.d/pure-ftpd-mysql" ]; then update-rc.d pure-ftpd-mysql defaults >/dev/null if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then invoke-rc.d pure-ftpd-mysql start || exit $? else /etc/init.d/pure-ftpd-mysql start || exit $? fi fi # End automatically added section # Don't wait on pure-ftpd to close file handles db_stop