[Lunar-commits] <moonbase-other> proftpd: readd it to the moonbase.

Florin Braescu florin at lunar-linux.org
Sun Jul 15 10:26:21 CEST 2012


commit f569f6841a9466e83d34b12147467d318153fa14
Author: Florin Braescu <florin at lunar-linux.org>
Date: Sun, 15 Jul 2012 01:26:21 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/f569f6841a9466e83d34b12147467d318153fa14

proftpd: readd it to the moonbase.
---
  ftp/proftpd/BUILD                                            +40/-0    
  ftp/proftpd/CONFIGURE                                        +5/-0     
  ftp/proftpd/CONFLICTS                                        +4/-0     
  ftp/proftpd/DEPENDS                                          +2/-0     
  ftp/proftpd/DETAILS                                          +19/-0    
  ftp/proftpd/init.d/ftpd                                      +22/-0    
  ftp/proftpd/pam.d/ftp                                        +10/-0    
  ftp/proftpd/services                                         +2/-0     
  ftp/proftpd/xinetd.d/proftpd                                 +12/-0    
  9 files changed, 116 insertions (+), 0 deletions (-)

--- /dev/null
+++ b/ftp/proftpd/BUILD
@@ -0,0 +1,40 @@
+(
+
+  PROFTPD_MODULES="mod_ifsession mod_ldap mod_radius mod_ratio mod_readme mod_rewrite mod_tls mod_wrap"
+  MODS=""
+
+  for mod in $PROFTPD_MODULES; do
+    if [ $(eval echo \$MOD_$mod) = "y" ]; then
+      MODS="$MODS:$mod"
+    fi
+  done
+
+  # ProFTPD only support one backend at a time
+  # We default to MySQL if both are enabled
+  if in_depends $MODULE mysql; then
+    MODS="$MODS:mod_sql:mod_sql_mysql"
+    OPTS+=" --with-includes=/usr/include/mysql"
+  else
+    if in_depends $MODULE postgresql; then
+      MODS="$MODS:mod_sql:mod_sql_postgres"
+      OPTS+=" --with-includes=/usr/include/postgresql"
+    fi
+  fi
+
+  MODS=`echo $MODS|sed -re 's%^:%%'`
+
+
+  if [ -n "$MODS" ]; then
+    OPTS+=" --with-modules=$MODS"
+  fi
+
+  if  module_installed  Linux-PAM;  then
+    OPTS=$OPTS" --enable-shadow $ENABLE_PAM"
+  fi
+
+  sedit  "s/\tstandalone/\tinetd/" sample-configurations/basic.conf  &&
+  cp  -r  sample-configurations  doc
+
+  default_build
+
+) > $C_FIFO 2>&1
--- /dev/null
+++ b/ftp/proftpd/CONFIGURE
@@ -0,0 +1,5 @@
+PROFTPD_MODULES="mod_ifsession mod_ldap mod_radius mod_ratio mod_readme mod_rewrite mod_tls mod_wrap"
+
+for mod in $PROFTPD_MODULES; do
+  mquery MOD_$mod "Enable $mod? " n
+done
--- /dev/null
+++ b/ftp/proftpd/CONFLICTS
@@ -0,0 +1,4 @@
+conflicts wu-ftpd
+conflicts vsftpd
+conflicts pure-ftpd
+
--- /dev/null
+++ b/ftp/proftpd/DEPENDS
@@ -0,0 +1,2 @@
+optional_depends "mysql"      "" "" "for MySQL support"
+optional_depends "postgresql" "" "" "for postgreSQL support"
--- /dev/null
+++ b/ftp/proftpd/DETAILS
@@ -0,0 +1,19 @@
+          MODULE=proftpd
+         VERSION=1.3.4a
+          SOURCE=$MODULE-$VERSION.tar.bz2
+      SOURCE_URL=ftp://ftp.proftpd.org/distrib/source
+      SOURCE_VFY=sha1:18ea33d8b9f858b6e735cc81af900f0eebee8d25
+        WEB_SITE=http://www.proftpd.org
+         ENTERED=20011112
+         UPDATED=20111112
+           SHORT="A ftp server"
+
+cat << EOF
+ProFTPD is a proven, high-performance, scalable FTP server written
+from scratch, with a focus toward simplicity, security, and ease of
+configuration. Naturally, ProFTPD powers some of the largest sites on
+the Internet. It features a very Apache-like configuration syntax,
+modules, and a highly customizable server infrastructure, including
+support for multiple 'virtual' FTP servers, anonymous FTP, and
+permission-based directory visibility.
+EOF
--- /dev/null
+++ b/ftp/proftpd/init.d/ftpd
@@ -0,0 +1,22 @@
+#!/bin/bash
+#
+# ftp	ProFTP ftp server
+#
+# chkconfig: 2345 80 20
+# description: ftp daemon
+# processname: proftpd
+# config:      /etc/ftpusers
+# config:      /etc/proftpd.conf
+# pidfile:     /var/run/proftpd.pid
+
+extended-status () {
+	ftpcount
+	ftpwho
+}
+
+usage () {
+	echo "Usage: $0 {start|stop|reload|probe|restart|status|extended-status}"
+}
+
+. /lib/lsb/init-functions
+
--- /dev/null
+++ b/ftp/proftpd/pam.d/ftp
@@ -0,0 +1,10 @@
+#
+# The PAM configuration file for the `ftp' service
+#
+auth		requisite	pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed
+auth		sufficient	pam_ftp.so
+auth		required	pam_unix.so  shadow nullok use_first_pass
+auth		requisite	pam_shells.so
+account		required	pam_unix.so
+session		required	pam_unix.so
+session		required	pam_limits.so
--- /dev/null
+++ b/ftp/proftpd/services
@@ -0,0 +1,2 @@
+ftp-data	20/tcp
+ftp		21/tcp
--- /dev/null
+++ b/ftp/proftpd/xinetd.d/proftpd
@@ -0,0 +1,12 @@
+service ftp
+{
+	socket_type	= stream
+	protocol	= tcp
+	wait		= no
+	user		= root
+	server		= /usr/sbin/proftpd
+	per_source	= 8
+	log_type	= FILE /var/log/xinetd/proftpd
+	log_on_success	= PID HOST USERID EXIT DURATION
+	log_on_failure	= USERID ATTEMPT
+}




More information about the Lunar-commits mailing list