PREUN
/bin/sh
if [ $1 -eq 0 ]; then
/sbin/service proftpd stop &>/dev/null || :
/sbin/chkconfig --del proftpd || :
/sbin/service xinetd reload &>/dev/null || :
/usr/bin/find /var/run/proftpd -depth -mindepth 1 |
/usr/bin/xargs /bin/rm -rf &>/dev/null || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ]; then
/sbin/chkconfig --add proftpd
IFS=":"; /bin/cat /etc/passwd | \
while { read username nu nu gid nu nu nu nu; }; do \
if [ $gid -lt 100 -a "$username" != "ftp" ]; then
echo $username >> /etc/ftpusers
fi
done
fi
POSTUN
/bin/sh
if [ $1 -ge 1 ]; then
/sbin/service proftpd condrestart &>/dev/null || :
fi