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 74d40256599d806aba605abd95d9dca0c75bf628 (commit)
from 221625553358d4e2b872b524b89632b5f50eaa76 (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=74d40256599d806aba605abd95d9dca0c75bf628
commit 74d40256599d806aba605abd95d9dca0c75bf628
Author: Franck Villaume <[email protected]>
Date: Fri Jul 7 13:00:42 2017 +0000
initial ftp post-install script
diff --git a/src/post-install.d/ftp/ftp.sh b/src/post-install.d/ftp/ftp.sh
new file mode 100755
index 0000000..3725a6b
--- /dev/null
+++ b/src/post-install.d/ftp/ftp.sh
@@ -0,0 +1,61 @@
+#! /bin/bash
+# Configure FTP server
+#
+# Copyright 2017, Franck Villaume - TrivialDev
+#
+# This file is part of FusionForge. FusionForge is free software;
+# you can redistribute it and/or modify it under the terms of the
+# GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the Licence, or (at your option)
+# any later version.
+#
+# FusionForge is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with FusionForge; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+set -x
+set -e
+
+. $(forge_get_config source_path)/post-install.d/common/service.inc
+
+configure_ftpd() {
+ sed -i -e 's/^anonymous_enable=YES.*$/anonymous_enable=NO/'
/etc/vsftpd/vsftpd.conf
+ sed -i -e 's/^#ftpd_banner=.*$/ftpd_banner=Welcome to FusionForge FTP
server/' /etc/vsftpd/vsftpd.conf
+}
+
+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
+}
+
+restart_ftp_service()
+{
+ service vsftpd restart
+}
+
+# Main
+case "$1" in
+ rawconfigure)
+ configure_ftpd
+ ;;
+ configure)
+ configure_ftpd
+ restart_ftp_service
+ ;;
+ remove)
+ remove_ftpd
+ restart_ftp_service
+ ;;
+ purge)
+ ;;
+ *)
+ echo "Usage: $0 {configure|rawconfigure|remove|purge}"
+ exit 1
+ ;;
+esac
+
-----------------------------------------------------------------------
Summary of changes:
.../{common/systasksd.sh => ftp/ftp.sh} | 63 ++++++++++++----------
1 file changed, 36 insertions(+), 27 deletions(-)
copy src/post-install.d/{common/systasksd.sh => ftp/ftp.sh} (50%)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits