diff options
author | Luca Longinotti <chtekk@gentoo.org> | 2008-04-17 07:57:57 +0000 |
---|---|---|
committer | Luca Longinotti <chtekk@gentoo.org> | 2008-04-17 07:57:57 +0000 |
commit | 7f7bb022a588eb8b8ca70715d5610624f5d357f5 (patch) | |
tree | 30d6007d40af83b1987cf9951b5bead070f1d868 /net-ftp/proftpd/files/proftpd.rc6 | |
parent | Add/fix net-ftp/proftpd local USE flags. (diff) | |
download | gentoo-2-7f7bb022a588eb8b8ca70715d5610624f5d357f5.tar.gz gentoo-2-7f7bb022a588eb8b8ca70715d5610624f5d357f5.tar.bz2 gentoo-2-7f7bb022a588eb8b8ca70715d5610624f5d357f5.zip |
Version bump to ProFTPd 1.3.1.
(Portage version: 2.1.5_rc4)
Diffstat (limited to 'net-ftp/proftpd/files/proftpd.rc6')
-rw-r--r-- | net-ftp/proftpd/files/proftpd.rc6 | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/net-ftp/proftpd/files/proftpd.rc6 b/net-ftp/proftpd/files/proftpd.rc6 index 47b2ef651776..c3c9fb03fbba 100644 --- a/net-ftp/proftpd/files/proftpd.rc6 +++ b/net-ftp/proftpd/files/proftpd.rc6 @@ -1,7 +1,9 @@ #!/sbin/runscript -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc6,v 1.11 2006/09/23 19:07:05 chtekk Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-ftp/proftpd/files/proftpd.rc6,v 1.12 2008/04/17 07:57:57 chtekk Exp $ + +opts="${opts} reload" depend() { need net @@ -14,6 +16,9 @@ checkconfig() { eerror "There is a sample file in /etc/proftpd." return 1 fi + ebegin "Checking proftpd configuration" + /usr/sbin/proftpd -t -c /etc/proftpd/proftpd.conf &>/dev/null + eend $? "Configuration error: please fix your configuration file (/etc/proftpd/proftpd.conf)." } start() { @@ -28,3 +33,14 @@ stop() { start-stop-daemon --stop --retry 20 --quiet --pidfile /var/run/proftpd.pid eend $? } + +reload() { + if [ ! -f /var/run/proftpd.pid ] ; then + eerror "proftpd isn't running!" + return 1 + fi + checkconfig || return 1 + ebegin "Reloading proftpd" + kill -HUP `cat /var/run/proftpd.pid` &>/dev/null + eend $? +} |