# Load CARNet functions
. /usr/share/carnet-tools/functions.sh
-if dpkg --compare-versions "$2" lt 2.0.5-2; then
+cp_check_and_sed '^#anonymous_enable=YES' \
+ 's/^#anonymous_enable=YES/anonymous_enable=NO/g' \
+ /etc/vsftpd.conf && restart="yes" || true
- cp_check_and_sed '^#anonymous_enable=YES' \
- 's/^#anonymous_enable=YES/anonymous_enable=NO/g' \
- /etc/vsftpd.conf && restart="yes" || true
+cp_check_and_sed '^anonymous_enable=YES' \
+ 's/^anonymous_enable=YES/anonymous_enable=NO/g' \
+ /etc/vsftpd.conf && restart="yes" || true
- cp_check_and_sed '^anonymous_enable=YES' \
- 's/^anonymous_enable=YES/anonymous_enable=NO/g' \
- /etc/vsftpd.conf && restart="yes" || true
+cp_check_and_sed '#local_enable=YES' \
+ 's/#local_enable=YES/local_enable=YES/g' \
+ /etc/vsftpd.conf && restart="yes" || true
- cp_check_and_sed '#local_enable=YES' \
- 's/#local_enable=YES/local_enable=YES/g' \
- /etc/vsftpd.conf && restart="yes" || true
+cp_check_and_sed '#write_enable=YES' \
+ 's/#write_enable=YES/write_enable=YES/g' \
+ /etc/vsftpd.conf && restart="yes" || true
- cp_check_and_sed '#write_enable=YES' \
- 's/#write_enable=YES/write_enable=YES/g' \
- /etc/vsftpd.conf && restart="yes" || true
-
- cp_check_and_sed '^#local_umask=' \
- 's/#local_umask=.*$/local_umask=022/g' \
- /etc/vsftpd.conf && restart="yes" || true
-fi
+cp_check_and_sed '^#local_umask=' \
+ 's/#local_umask=.*$/local_umask=022/g' \
+ /etc/vsftpd.conf && restart="yes" || true
# restart if needed
[ "$restart" = "yes" ] || exit 0