diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2013-01-03 00:01:37 +0100 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2013-01-03 00:01:37 +0100 |
commit | 4a370150f533c16a858dc7904b9d52060c02e8eb (patch) | |
tree | 3ee76999440d628afff83a13fbdc6372e66d0e67 /testing | |
parent | abfa125c710f2baaad2be4378be8e060e88b4416 (diff) | |
download | aports-4a370150f533c16a858dc7904b9d52060c02e8eb.tar.bz2 aports-4a370150f533c16a858dc7904b9d52060c02e8eb.tar.xz |
testing/pure-ftpd: upgrade to 1.0.36 and initd
Diffstat (limited to 'testing')
-rw-r--r-- | testing/pure-ftpd/APKBUILD | 8 | ||||
-rw-r--r-- | testing/pure-ftpd/pure-ftpd.confd | 3 | ||||
-rw-r--r-- | testing/pure-ftpd/pure-ftpd.initd | 46 |
3 files changed, 30 insertions, 27 deletions
diff --git a/testing/pure-ftpd/APKBUILD b/testing/pure-ftpd/APKBUILD index 1717af8664..b9c7fe706c 100644 --- a/testing/pure-ftpd/APKBUILD +++ b/testing/pure-ftpd/APKBUILD @@ -1,7 +1,7 @@ # Contributor: Douglas Haber <me@douglashaber.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=pure-ftpd -pkgver=1.0.32 +pkgver=1.0.36 pkgrel=0 pkgdesc="Pure FTPD FTP daemon" url="http://pureftpd.org" @@ -48,6 +48,6 @@ package() { "$pkgdir"/etc/conf.d/$pkgname || return 1 } -md5sums="a766eb36d537fd30217ffa129eb599b1 pure-ftpd-1.0.32.tar.gz -4805788f4aeeb4efee64ddad0b526c3c pure-ftpd.initd -5f1d2a2d353fc00bc39efa0ae6f1955f pure-ftpd.confd" +md5sums="bbcb48e8aa6ec1abff9775b89f84af91 pure-ftpd-1.0.36.tar.gz +8ee239bb4d6b1a93649bf281cdc2f595 pure-ftpd.initd +85eec24d205663fbc0a3b37fdbe08e84 pure-ftpd.confd" diff --git a/testing/pure-ftpd/pure-ftpd.confd b/testing/pure-ftpd/pure-ftpd.confd index f14cb0b19c..29b15a5a89 100644 --- a/testing/pure-ftpd/pure-ftpd.confd +++ b/testing/pure-ftpd/pure-ftpd.confd @@ -19,9 +19,6 @@ SERVER="-S 21" MAX_CONN="-c 30" MAX_CONN_IP="-C 10" -## Start daemonized in background ## -DAEMON="-B" - ## Don't allow uploads if the partition is more full then this var ## DISK_FULL="-k 90%" diff --git a/testing/pure-ftpd/pure-ftpd.initd b/testing/pure-ftpd/pure-ftpd.initd index 768c565efd..0c4737e80c 100644 --- a/testing/pure-ftpd/pure-ftpd.initd +++ b/testing/pure-ftpd/pure-ftpd.initd @@ -1,11 +1,13 @@ #!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/files/pure-ftpd.rc10,v 1.1 2010/08/19 08:07:13 polynomial-c Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/pure-ftpd/files/pure-ftpd.rc11,v 1.4 2012/03/29 11:33:22 polynomial-c Exp $ ftpd_pidfile="/var/run/pure-ftpd.pid" script_pidfile="/var/run/pure-uploadscript.pid" ftpd_rundir="/var/lib/run/pure-ftpd" +daemon="/usr/sbin/pure-ftpd" +script_daemon="/usr/sbin/pure-uploadscript" depend() { need net @@ -21,6 +23,16 @@ checkconfig() { start() { checkconfig || return 1 + UPSCRIPT="" + if [ -n "$UPLOADSCRIPT" ] ; then + UPSCRIPT="--uploadscript" + fi + + FTPD_CONFIG="$SERVER $MAX_CONN $MAX_CONN_IP $DISK_FULL $USE_NAT $AUTH + $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT" + + WAIT="--wait 100" + if ${TMPFS_MOUNT:-false} && grep -q tmpfs /proc/filesystems ; then [ -n "${TMPFS_OPTS}" ] && MOUNT_OPTS="-o ${TMPFS_OPTS}" einfo "Mounting tmpfs on ${ftpd_rundir}" @@ -28,20 +40,10 @@ start() { || eerror "Unable to mount tmpfs" fi - # only works with openrc - WAIT="" - if [ -f /etc/init.d/sysfs ]; then - WAIT="--wait 100" - fi - - UPSCRIPT="" - OKNODO="" - if [ -n "$UPLOADSCRIPT" ] ; then - UPSCRIPT="--uploadscript" - OKNODO="--oknodo" - fi ebegin "Starting Pure-FTPd" - start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} $OKNODO --exec /usr/sbin/pure-ftpd ${WAIT} -- --pidfile ${ftpd_pidfile} $SERVER $MAX_CONN $MAX_CONN_IP $DAEMON $DISK_FULL $USE_NAT $AUTH $LOG $TIMEOUT $CHARCONV $MISC_OTHER $UPSCRIPT + start-stop-daemon --start --quiet --pidfile ${ftpd_pidfile} \ + --make-pidfile --background --exec /usr/sbin/pure-ftpd ${WAIT} \ + -- $(echo ${FTPD_CONFIG} | sed 's@\([[:space:]]\+\|^\)-B\([[:space:]]\+\|$\)@\1@g') result=$? if [ $result -ne 0 ] ; then eend 1 "Could not launch Pure-FTPd" @@ -49,21 +51,25 @@ start() { eend $result if [ -n "$UPLOADSCRIPT" ] ; then ebegin "Starting Pure-FTPd upload script" - start-stop-daemon --start --quiet --make-pidfile --pidfile ${script_pidfile} --exec /usr/sbin/pure-uploadscript --background ${WAIT} -- -r $UPLOADSCRIPT + start-stop-daemon --start --quiet --make-pidfile \ + --pidfile ${script_pidfile} \ + --exec ${script_daemon} --background ${WAIT} \ + -- -r $UPLOADSCRIPT eend $? fi fi } stop() { - ebegin "Stopping Pure-FTPd" - start-stop-daemon --stop --retry 20 --quiet --pidfile ${ftpd_pidfile} - eend $? if [ -n "$UPLOADSCRIPT" ] ; then ebegin "Stopping Pure-FTPd upload script" - start-stop-daemon --stop --retry 20 --quiet --pidfile ${script_pidfile} + start-stop-daemon --stop --retry 20 --quiet \ + --pidfile ${script_pidfile} eend $? fi + ebegin "Stopping Pure-FTPd" + start-stop-daemon --stop --retry 20 --quiet --pidfile ${ftpd_pidfile} + eend $? if ${TMPFS_MOUNT:-false} && mount | grep -q ${ftpd_rundir} ; then umount ${ftpd_rundir} >/dev/null 2>&1 |