diff options
author | Christophe Trussardi <chris@teria.org> | 2013-01-02 21:12:20 +0100 |
---|---|---|
committer | dsomero <xgizzmo@slackbuilds.org> | 2013-01-09 18:52:16 -0500 |
commit | 7300e7bd4d79f84b00b0d31cb3fffc53e77f6299 (patch) | |
tree | 12bc071f57015762320d21b2309306dd80c556e8 /network/pure-ftpd/doinst.sh | |
parent | 77df938196d1ac4b21673e2daca6b080793d8894 (diff) |
network/pure-ftpd: Added (FTP server).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/pure-ftpd/doinst.sh')
-rw-r--r-- | network/pure-ftpd/doinst.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/network/pure-ftpd/doinst.sh b/network/pure-ftpd/doinst.sh new file mode 100644 index 0000000000000..50e495056004b --- /dev/null +++ b/network/pure-ftpd/doinst.sh @@ -0,0 +1,26 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/rc.d/rc.pure-ftpd.new +config etc/pure-ftpd/pure-ftpd.conf.new +config etc/pure-ftpd/pureftpd-ldap.conf.new +config etc/pure-ftpd/pureftpd-mysql.conf.new +config etc/pure-ftpd/pureftpd-pgsql.conf.new +config etc/pure-ftpd/pureftpd.schema.new |