5 [ "$1" = "configure" ] || exit 0
7 # Load CARNet functions
8 . /usr/share/carnet-tools/functions.sh
10 if dpkg --compare-versions "$2" lt 2.0.3-1; then
12 cp_check_and_sed '^#anonymous_enable=YES' \
13 's/^#anonymous_enable=YES/anonymous_enable=NO/g' \
14 /etc/vsftpd.conf && restart="yes" || true
16 cp_check_and_sed '^anonymous_enable=YES' \
17 's/^anonymous_enable=YES/anonymous_enable=NO/g' \
18 /etc/vsftpd.conf && restart="yes" || true
20 cp_check_and_sed '#local_enable=YES' \
21 's/#local_enable=YES/local_enable=YES/g' \
22 /etc/vsftpd.conf && restart="yes" || true
24 cp_check_and_sed '#write_enable=YES' \
25 's/#write_enable=YES/write_enable=YES/g' \
26 /etc/vsftpd.conf && restart="yes" || true
28 cp_check_and_sed '^#local_umask=' \
29 's/#local_umask=.*$/local_umask=022/g' \
30 /etc/vsftpd.conf && restart="yes" || true
34 [ "$restart" = "yes" ] || exit 0
35 if [ -x /usr/sbin/invoke-rc.d ]; then
36 invoke-rc.d vsftpd restart
38 [ -x /etc/init.d/vsftpd ] && /etc/init.d/vsftpd restart