ports/opt (3.1): pure-ftpd: update to 1.0.38
commit 092cd5b33c3362098b246e96fcfd91556c296ad2 Author: Juergen Daubert <jue@jue.li> Date: Mon May 25 12:09:47 2015 +0200 pure-ftpd: update to 1.0.38 diff --git a/pure-ftpd/.md5sum b/pure-ftpd/.md5sum index cc3386e..f93612c 100644 --- a/pure-ftpd/.md5sum +++ b/pure-ftpd/.md5sum @@ -1,3 +1,3 @@ -0b7a656fc4d50cc638a87668f9079430 pure-ftpd -8ece9270ead3d1f8db3675c3dfc9d9ad pure-ftpd-1.0.37.tar.bz2 +3698dc9fced3c059e3acd0497bda6b1a pure-ftpd +65e30ba3fa18bb939e2d93bb6d57593d pure-ftpd-1.0.38.tar.bz2 91e56b81f8f77c8b9d81d455817b1892 pure-ftpd.conf diff --git a/pure-ftpd/Pkgfile b/pure-ftpd/Pkgfile index b8a8150..7d43b20 100644 --- a/pure-ftpd/Pkgfile +++ b/pure-ftpd/Pkgfile @@ -4,7 +4,7 @@ # Depends on: openssl name=pure-ftpd -version=1.0.37 +version=1.0.38 release=1 source=(http://download.pureftpd.org/$name/releases/$name-$version.tar.bz2 \ pure-ftpd pure-ftpd.conf) diff --git a/pure-ftpd/pure-ftpd b/pure-ftpd/pure-ftpd index ef837c2..a0b6184 100644 --- a/pure-ftpd/pure-ftpd +++ b/pure-ftpd/pure-ftpd @@ -3,29 +3,42 @@ # /etc/rc.d/pure-ftpd: start/stop pure-ftpd daemon # +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/pure-ftpd +PID=/var/run/pure-ftpd.pid +CRT=/etc/ssl/certs/pure-ftpd.pem + CONF=/etc/pure-ftpd.conf ARGS=$(sed -e '/^\s*$/d' -e '/^#/d' $CONF) -CRT=/etc/ssl/certs/pure-ftpd.pem case $1 in start) - if [ ! -s $CRT ]; then + if [ ! -s $CRT ]; then /usr/bin/mksslcert $CRT $CRT fi - /usr/sbin/pure-ftpd $ARGS + + $SSD --start --pidfile $PID --exec $PROG -- $ARGS ;; stop) - killall -q /usr/sbin/pure-ftpd + $SSD --stop --retry 10 --pidfile $PID ;; restart) $0 stop - sleep 2 $0 start ;; +status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running with pid $(cat $PID)" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; *) - echo "usage: $0 [start|stop|restart]" + echo "usage: $0 [start|stop|restart|reload|status]" ;; esac -# End of file \ No newline at end of file +# End of file
participants (1)
-
crux@crux.nu