[Fusionforge-commits] FusionForge branch master updated. v6.0.5-2105-g92278ba

Franck Villaume nerville at libremir.placard.fr.eu.org
Mon Aug 14 09:06:13 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  92278badc6e089bc9bd2e00aafff1b6fa0c128fc (commit)
      from  d494fd2fd917d8709e91afc507b2bfc16536ef52 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=92278badc6e089bc9bd2e00aafff1b6fa0c128fc

commit 92278badc6e089bc9bd2e00aafff1b6fa0c128fc
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Aug 14 09:05:50 2017 +0200

    make ftp.sh debian aware

diff --git a/src/post-install.d/ftp/ftp.sh b/src/post-install.d/ftp/ftp.sh
index 1d6a133..cc06c77 100755
--- a/src/post-install.d/ftp/ftp.sh
+++ b/src/post-install.d/ftp/ftp.sh
@@ -21,25 +21,28 @@
 set -e
 
 . $(forge_get_config source_path)/post-install.d/common/service.inc
+vsftpdconffile=$(ls /etc/vsftpd.conf /etc/vsftpd/vsftpd.conf 2>/dev/null | tail -1)
+#Debian: /etc/vsftpd.conf
+#CentOS: /etc/vsftpd/vsftpd.conf
 
 configure_ftpd() {
-    sed -i -e 's/^anonymous_enable=.*$/anonymous_enable=NO/' /etc/vsftpd/vsftpd.conf
-    sed -i -e 's/^#ftpd_banner=.*$/ftpd_banner=Welcome to FusionForge FTP server/' /etc/vsftpd/vsftpd.conf
-    sed -i -e 's/^#chroot_local_user=.*$/chroot_local_user=YES/' /etc/vsftpd/vsftpd.conf
+    sed -i -e 's/^anonymous_enable=.*$/anonymous_enable=NO/' $vsftpdconffile
+    sed -i -e 's/^#ftpd_banner=.*$/ftpd_banner=Welcome to FusionForge FTP server/' $vsftpdconffile
+    sed -i -e 's/^#chroot_local_user=.*$/chroot_local_user=YES/' $vsftpdconffile
     if [[ $is_docker ]]; then
-        if [[ -z `grep 'background=NO' /etc/vsftpd/vsftpd.conf` ]];then
-            echo 'background=NO' >> /etc/vsftpd/vsftpd.conf
+        if [[ -z `grep 'background=NO' $vsftpdconffile` ]];then
+            echo 'background=NO' >> $vsftpdconffile
         fi
     fi
 }
 
 remove_ftpd() {
-    sed -i -e 's/^anonymous_enable=NO.*$/anonymous_enable=YES/' /etc/vsftpd/vsftpd.conf
-    sed -i -e 's/^ftpd_banner=Welcome.*$/#ftpd_banner=Welcome to blah FTP service./' /etc/vsftpd/vsftpd.conf
-    sed -i -e 's/^chroot_local_user=YES.*$/#chroot_local_user=NO/' /etc/vsftpd/vsftpd.conf
+    sed -i -e 's/^anonymous_enable=NO.*$/anonymous_enable=YES/' $vsftpdconffile
+    sed -i -e 's/^ftpd_banner=Welcome.*$/#ftpd_banner=Welcome to blah FTP service./' $vsftpdconffile
+    sed -i -e 's/^chroot_local_user=YES.*$/#chroot_local_user=NO/' $vsftpdconffile
     if [[ $is_docker ]]; then
-        if [[ ! -z `grep 'background=NO' /etc/vsftpd/vsftpd.conf` ]];then
-            sed -i '$d' /etc/vsftpd/vsftpd.conf
+        if [[ ! -z `grep 'background=NO' $vsftpdconffile` ]];then
+            sed -i '$d' $vsftpdconffile
         fi
     fi
 }

-----------------------------------------------------------------------

Summary of changes:
 src/post-install.d/ftp/ftp.sh | 23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list