From a45b405e06ade33197ffc25cd91ba5f66fff8949 Mon Sep 17 00:00:00 2001 From: Christoph Date: Fri, 23 Jun 2017 03:46:07 +0200 Subject: [PATCH] Copy conf dir for backup not move it away. Add configuration parameters 'FSCharset' and 'PureDB'. --- install_pure-ftpd.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/install_pure-ftpd.sh b/install_pure-ftpd.sh index 8f7d986..0459e33 100755 --- a/install_pure-ftpd.sh +++ b/install_pure-ftpd.sh @@ -106,7 +106,7 @@ fi echononl " Backup existing Configuration Directory" if [[ -d "/etc/pure-ftpd/conf" ]]; then - mv /etc/pure-ftpd/conf /etc/pure-ftpd/conf.$(date +%Y-%m-%d-%H%M) > /dev/null 2> "$tmp_err_msg" + cp -a /etc/pure-ftpd/conf /etc/pure-ftpd/conf.$(date +%Y-%m-%d-%H%M) > /dev/null 2> "$tmp_err_msg" if [[ $? -eq 0 ]] ; then echo_ok else @@ -147,10 +147,18 @@ if [[ "$?" -ne 0 ]] ; then installation_failed=true error "$(cat $tmp_err_msg)" fi +echo "UTF-8" > /etc/pure-ftpd/conf/FSCharset +if [[ "$?" -ne 0 ]] ; then + installation_failed=true +fi echo "80" > /etc/pure-ftpd/conf/MaxDiskUsage if [[ "$?" -ne 0 ]] ; then installation_failed=true fi +echo 'ALL:!aNULL:!SSLv3' > /etc/pure-ftpd/conf/TLSCipherSuite +if [[ "$?" -ne 0 ]] ; then + installation_failed=true +fi echo "1" > /etc/pure-ftpd/conf/TLS if [[ "$?" -ne 0 ]] ; then installation_failed=true @@ -195,6 +203,7 @@ echo "no" > /etc/pure-ftpd/conf/PAMAuthentication if [[ "$?" -ne 0 ]] ; then installation_failed=true fi +echo "/etc/pure-ftpd/pureftpd.pdb" > /etc/pure-ftpd/conf/PureDB if $installation_failed ; then echo_failed else