X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=vsftpd-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;fp=debian%2Fpostinst;h=3dbc9636f9bef5b2d8a361bce624d6c92a044b5f;hp=503f0e0e0af3c1271a2d023b68ea7b13c1c347c1;hb=b1266e43c8a49d6d040192a0ccc2a662842f9806;hpb=4365f2e447123ea009c6b64b120c71031d6e5abd diff --git a/debian/postinst b/debian/postinst index 503f0e0..3dbc963 100755 --- a/debian/postinst +++ b/debian/postinst @@ -8,28 +8,25 @@ set -e # 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