diff options
author | 2010-02-17 12:28:25 +0000 | |
---|---|---|
committer | 2010-02-17 12:28:25 +0000 | |
commit | c853b9c0cb5ac3803d1ecb95707332c1be02802f (patch) | |
tree | 0209330c010cb2dbc93f964b0c96cc93a28b8561 /net-ftp/proftpd/files | |
parent | Revision bump for security #303727 (CVE-2009-3560). (diff) | |
download | gentoo-2-c853b9c0cb5ac3803d1ecb95707332c1be02802f.tar.gz gentoo-2-c853b9c0cb5ac3803d1ecb95707332c1be02802f.tar.bz2 gentoo-2-c853b9c0cb5ac3803d1ecb95707332c1be02802f.zip |
Version bumps, by Bernd Lommerzheim <bernd@lommerzheim.com> in bug #305343. Also fixes bugs #301264 and #301266
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'net-ftp/proftpd/files')
-rw-r--r-- | net-ftp/proftpd/files/proftpd.initd | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/net-ftp/proftpd/files/proftpd.initd b/net-ftp/proftpd/files/proftpd.initd new file mode 100644 index 000000000000..1e2f9b2c8f66 --- /dev/null +++ b/net-ftp/proftpd/files/proftpd.initd @@ -0,0 +1,51 @@ +#!/sbin/runscript +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.initd,v 1.1 2010/02/17 12:28:25 voyageur Exp $ + +opts="reload" + +depend() { + need net + use logger dns mysql postgresql antivirus +} + +check_configuration() { + if [ ! -e /etc/proftpd/proftpd.conf ] ; then + eerror "To execute the ProFTPD server you need a /etc/proftpd/proftpd.conf configuration" + eerror "file. In /etc/proftpd you can find a sample configuration." + return 1 + fi + ebegin "Checking ProFTPD configuration" + /usr/sbin/proftpd -t + eend $? "A configuration error was found. You have to fix your configuration file." +} + +start() { + [ -d /var/run/proftpd ] || mkdir /var/run/proftpd + [ "${RC_CMD}" = "restart" ] || check_configuration || return 1 + ebegin "Starting ProFTPD" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/proftpd \ + --pidfile /var/run/proftpd/proftpd.pid + eend $? +} + +stop() { + [ "${RC_CMD}" != "restart" ] || check_configuration || return 1 + ebegin "Stopping ProFTPD" + start-stop-daemon --stop --quiet --retry 20 \ + --pidfile /var/run/proftpd/proftpd.pid + eend $? +} + +reload() { + if [ ! -f /var/run/proftpd/proftpd.pid ] ; then + eerror "ProFTPD is not running." + return 1 + fi + check_configuration || return 1 + ebegin "Reloading ProFTPD" + kill -HUP `cat /var/run/proftpd/proftpd.pid` &>/dev/null + eend $? +} |