From 0fc1870f2eadde8cb06004be1cbe8d1a4333aa69 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 16 Aug 2012 00:02:36 +0000 Subject: Thu Aug 16 00:02:36 UTC 2012 --- testing/proftpd/PKGBUILD | 56 +++++++++++++++++++++++++++++++++++++++ testing/proftpd/proftpd | 41 ++++++++++++++++++++++++++++ testing/proftpd/proftpd.conf.d | 4 +++ testing/proftpd/proftpd.logrotate | 5 ++++ testing/proftpd/proftpd.service | 14 ++++++++++ 5 files changed, 120 insertions(+) create mode 100644 testing/proftpd/PKGBUILD create mode 100755 testing/proftpd/proftpd create mode 100644 testing/proftpd/proftpd.conf.d create mode 100644 testing/proftpd/proftpd.logrotate create mode 100644 testing/proftpd/proftpd.service (limited to 'testing/proftpd') diff --git a/testing/proftpd/PKGBUILD b/testing/proftpd/PKGBUILD new file mode 100644 index 000000000..4bfa43e3d --- /dev/null +++ b/testing/proftpd/PKGBUILD @@ -0,0 +1,56 @@ +# $Id: PKGBUILD 165249 2012-08-14 16:09:40Z andrea $ +# Maintainer: +# Contributor: Daniel J Griffiths + +pkgname=proftpd +pkgver=1.3.4b +pkgrel=2 +epoch=1 +pkgdesc="A high-performance, scalable FTP server" +arch=('i686' 'x86_64') +url="http://www.proftpd.org" +license=('GPL') +depends=('libmysqlclient' 'postgresql-libs') +backup=('etc/proftpd.conf' 'etc/conf.d/proftpd') +source=(ftp://ftp.proftpd.org/distrib/source/${pkgname}-${pkgver}.tar.gz{,.asc} + 'proftpd' 'proftpd.logrotate' 'proftpd.conf.d' 'proftpd.service') +md5sums=('0871e0b93c9c3c88ca950b6d9a04aed2' + 'e5b9bd78029a15f82994efcb7ed2e9fb' + 'c439a0a1dbc21b604d8382da87aa021b' + 'ddb09eb13131becdf0e081eef413116b' + '71d5932b0461c318ed68c2c0c2660736' + '2c446f531948c8cc0a1e0fae28f8dfda') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + ./configure --prefix=/usr \ + --libexecdir=/usr/lib \ + --disable-pam \ + --with-modules=mod_quotatab:mod_quotatab_sql:mod_quotatab_file:mod_tls:mod_ldap:mod_sql:mod_sql_mysql:mod_sql_postgres \ + --sysconfdir=/etc \ + --localstatedir=/run/proftpd \ + --enable-ctrls \ + --enable-ipv6 \ + --with-includes=/usr/include/mysql:/usr/include/postgresql \ + --with-libraries=/usr/lib/mysql:/usr/lib/postgresql \ + --enable-nls \ + --with-systemd + + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + + make DESTDIR="${pkgdir}" install + sed -i 's|nogroup|nobody|g' "${pkgdir}/etc/proftpd.conf" + + install -Dm644 ../proftpd.logrotate "${pkgdir}/etc/logrotate.d/proftpd" + install -Dm644 ../proftpd.conf.d "${pkgdir}/etc/conf.d/proftpd" + install -Dm755 ../proftpd "${pkgdir}/etc/rc.d/proftpd" + install -Dm755 contrib/xferstats.holger-preiss "${pkgdir}/usr/bin/ftpstats" + + install -d "${pkgdir}/usr/lib/systemd/system/" + install -m644 "${srcdir}"/proftpd.service "${pkgdir}/usr/lib/systemd/system/" +} diff --git a/testing/proftpd/proftpd b/testing/proftpd/proftpd new file mode 100755 index 000000000..9ea1d47fc --- /dev/null +++ b/testing/proftpd/proftpd @@ -0,0 +1,41 @@ +#!/bin/bash + +# source application-specific settings +PROFTPD_ARGS= +[ -f /etc/conf.d/proftpd ] && . /etc/conf.d/proftpd + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting ProFTPd Server" + /usr/sbin/proftpd ${PROFTPD_ARGS} + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon proftpd + stat_done + fi + ;; + stop) + stat_busy "Stopping ProFTPd Server" + [ -f /run/proftpd/proftpd.pid ] && kill $(cat /run/proftpd/proftpd.pid) &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm -f /run/proftpd/proftpd.pid + rm_daemon proftpd + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 + diff --git a/testing/proftpd/proftpd.conf.d b/testing/proftpd/proftpd.conf.d new file mode 100644 index 000000000..1a5a8a201 --- /dev/null +++ b/testing/proftpd/proftpd.conf.d @@ -0,0 +1,4 @@ +# +# Parameters to be passed to proftpd +# +PROFTPD_ARGS="" diff --git a/testing/proftpd/proftpd.logrotate b/testing/proftpd/proftpd.logrotate new file mode 100644 index 000000000..7b6d7a87b --- /dev/null +++ b/testing/proftpd/proftpd.logrotate @@ -0,0 +1,5 @@ +/var/log/xferlog { + postrotate + /bin/kill -HUP `cat /var/run/proftpd.pid 2>/dev/null` 2>/dev/null || true + endscript +} diff --git a/testing/proftpd/proftpd.service b/testing/proftpd/proftpd.service new file mode 100644 index 000000000..c202a2fdf --- /dev/null +++ b/testing/proftpd/proftpd.service @@ -0,0 +1,14 @@ +[Unit] +Description = ProFTPD FTP Server +After = network.target nss-lookup.target local-fs.target remote-fs.target + +[Service] +Type = forking +PIDFile = /run/proftpd/proftpd.pid +Environment = PROFTPD_ARGS= +EnvironmentFile = -/etc/conf.d/proftpd +ExecStart = /usr/sbin/proftpd $PROFTPD_ARGS +ExecReload = /bin/kill -HUP $MAINPID + +[Install] +WantedBy = multi-user.target -- cgit v1.2.3-54-g00ecf