diff options
Diffstat (limited to 'extra/bftpd')
-rw-r--r-- | extra/bftpd/PKGBUILD | 25 | ||||
-rwxr-xr-x | extra/bftpd/bftpd.rc | 6 | ||||
-rw-r--r-- | extra/bftpd/bftpd.service | 10 | ||||
-rw-r--r-- | extra/bftpd/bftpd.socket | 10 | ||||
-rw-r--r-- | extra/bftpd/bftpd.xinetd | 2 | ||||
-rw-r--r-- | extra/bftpd/bftpd_AT.service | 8 |
6 files changed, 50 insertions, 11 deletions
diff --git a/extra/bftpd/PKGBUILD b/extra/bftpd/PKGBUILD index 538708952..3d8c636ae 100644 --- a/extra/bftpd/PKGBUILD +++ b/extra/bftpd/PKGBUILD @@ -1,9 +1,9 @@ -# $Id: PKGBUILD 162345 2012-06-25 18:19:31Z thomas $ +# $Id: PKGBUILD 165789 2012-08-29 23:52:16Z thomas $ # Maintainer: Thomas Bächler <thomas@archlinux.org> pkgname=bftpd pkgver=3.8 -pkgrel=1 +pkgrel=2 pkgdesc="Small, easy-to-configure FTP server" arch=(i686 x86_64) url="http://bftpd.sourceforge.net/" @@ -18,27 +18,34 @@ source=(http://downloads.sourceforge.net/sourceforge/bftpd/bftpd-$pkgver.tar.gz bftpd.rc bftpd.logrotate bftpd.pam - bftpd.xinetd) + bftpd.xinetd + bftpd.service + bftpd.socket + bftpd_AT.service) md5sums=('880c1274e623ddd1e3e37f9f0cf09d70' - '56a1bf7738a6db2b2cff89e611f4f11a' + '2419d7293000813f9d01bd357181445c' '853680dad0df39d0b4d2fb43d4be430a' '96f82c38f3f540b53f3e5144900acf17' - 'ff70fd962666f4d74749a1c68167a966') + '23feb84e8ecbae5df320b49e01821d9a' + '94b483f7c7b65580a30ebc6a8fe80d1b' + '93509ee83148160f60c009a2192a6774' + 'cb6a3334a7c8b5b8b559a643a65928c4') build() { cd "${srcdir}"/$pkgname # The bftpd author keeps screwing up the release tarballs rm -f config.{cache,status} + sed 's|$(prefix)/sbin|$(prefix)/bin|g' -i Makefile.in ./configure --prefix=/usr \ --enable-pam \ --mandir=/usr/share/man \ - --sysconfdir=/etc + --sysconfdir=/etc \ make } package() { cd "${srcdir}"/$pkgname - install -d -m755 "${pkgdir}"/usr/{sbin,share/man/man8} + install -d -m755 "${pkgdir}"/usr/{bin,share/man/man8} install -D -m644 "${srcdir}"/bftpd.logrotate "${pkgdir}"/etc/logrotate.d/bftpd install -D -m755 "${srcdir}"/bftpd.rc "${pkgdir}"/etc/rc.d/bftpd make DESTDIR="${pkgdir}" install @@ -56,4 +63,8 @@ package() { rmdir "${pkgdir}"/usr/etc # Fix default in config file sed 's|#ROOTDIR="/path/for/anonymous/user"|# bftpd interprets ROOTDIR="%h" (the default), as ROOTDIR="/" for the anonymous user, override it\n ROOTDIR="/srv/ftp"|' -i "${pkgdir}"/etc/bftpd.conf + # Install systemd files + install -D -m644 "${srcdir}"/bftpd.service "${pkgdir}"/usr/lib/systemd/system/bftpd.service + install -D -m644 "${srcdir}"/bftpd_AT.service "${pkgdir}"/usr/lib/systemd/system/bftpd@.service + install -D -m644 "${srcdir}"/bftpd.socket "${pkgdir}"/usr/lib/systemd/system/bftpd.socket } diff --git a/extra/bftpd/bftpd.rc b/extra/bftpd/bftpd.rc index 2f31cf50c..4784ae28a 100755 --- a/extra/bftpd/bftpd.rc +++ b/extra/bftpd/bftpd.rc @@ -8,15 +8,15 @@ PIDFILE="/var/run/bftpd.pid" case "$1" in start) stat_busy "Starting bftpd Server" - PID="$(pidof -o %PPID /usr/sbin/bftpd)" + PID="$(pidof -o %PPID /usr/bin/bftpd)" if [ -z "$PID" ]; then - /usr/sbin/bftpd -d + /usr/bin/bftpd -d if [ $? -gt 0 ]; then stat_fail else # wait until it forks sleep 2 - echo $(pidof -o %PPID /usr/sbin/bftpd) > $PIDFILE + echo $(pidof -o %PPID /usr/bin/bftpd) > $PIDFILE add_daemon bftpd stat_done fi diff --git a/extra/bftpd/bftpd.service b/extra/bftpd/bftpd.service new file mode 100644 index 000000000..8f8209247 --- /dev/null +++ b/extra/bftpd/bftpd.service @@ -0,0 +1,10 @@ +[Unit] +Description=bftpd daemon + +[Service] +Type=forking +ExecStart=/usr/bin/bftpd -d +GuessMainPID=yes + +[Install] +WantedBy=multi-user.target diff --git a/extra/bftpd/bftpd.socket b/extra/bftpd/bftpd.socket new file mode 100644 index 000000000..b16dfa278 --- /dev/null +++ b/extra/bftpd/bftpd.socket @@ -0,0 +1,10 @@ +[Unit] +Description=bftpd incoming socket +Conflicts=bftpd.service + +[Socket] +ListenStream=21 +Accept=yes + +[Install] +WantedBy=sockets.target diff --git a/extra/bftpd/bftpd.xinetd b/extra/bftpd/bftpd.xinetd index 68c931243..0b42da8e1 100644 --- a/extra/bftpd/bftpd.xinetd +++ b/extra/bftpd/bftpd.xinetd @@ -3,7 +3,7 @@ service ftp socket_type = stream wait = no user = root - server = /usr/sbin/bftpd + server = /usr/bin/bftpd server_args = -i log_on_success += HOST DURATION log_on_failure += HOST diff --git a/extra/bftpd/bftpd_AT.service b/extra/bftpd/bftpd_AT.service new file mode 100644 index 000000000..1e84dc8ad --- /dev/null +++ b/extra/bftpd/bftpd_AT.service @@ -0,0 +1,8 @@ +[Unit] +Description=bftpd daemon + +[Service] +ExecStart=/usr/bin/bftpd -i +StandardInput=socket +StandardOutput=socket +StandardError=socket |