Allow specification of custom ProFTPD configuration file

PR:		ports/187678
Submitted by: 	Daniel Ylitalo <daniel@blodan.se>
This commit is contained in:
Martin Matuska 2014-03-27 23:31:52 +00:00
parent 68eeec6389
commit d052a5a0d2
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=349374
2 changed files with 8 additions and 10 deletions

View file

@ -5,7 +5,7 @@ PORTNAME?= proftpd
.if !defined(DISTVERSION)
PORTVERSION?= ${PROFTPD_VERSION}
.endif
PORTREVISION?= 4
PORTREVISION?= 5
CATEGORIES?= ftp
MASTER_SITES= ftp://ftp.proftpd.org/distrib/source/ \
https://github.com/downloads/proftpd/proftpd.github.com/ \

View file

@ -22,22 +22,20 @@
name=proftpd
rcvar=proftpd_enable
proftpd_enable=${proftpd_enable:="NO"}
proftpd_config=${proftpd_config:="%%PREFIX%%/etc/proftpd.conf"}
command=%%PREFIX%%/sbin/proftpd
pidfile=$(grep PidFile /usr/local/etc/proftpd.conf | awk '{print($2)}')
required_files=%%PREFIX%%/etc/proftpd.conf
command_args="-c ${proftpd_config}"
pidfile=$(grep PidFile ${proftpd_config} | awk '{print($2)}')
required_files=${proftpd_config}
extra_commands="reload"
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
# set defaults
proftpd_enable=${proftpd_enable:-"NO"}
extra_commands="reload"
load_rc_config $name
run_rc_command "$1"