Date: Wed, 2 Apr 2014 19:53:58 +0000 (UTC) From: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r349953 - in branches/2014Q2/ftp/pure-ftpd: . files Message-ID: <201404021953.s32JrwLQ047882@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sunpoet Date: Wed Apr 2 19:53:57 2014 New Revision: 349953 URL: http://svnweb.freebsd.org/changeset/ports/349953 QAT: https://qat.redports.org/buildarchive/r349953/ Log: MFH: r349947 - Fix rc script: - Reorder variables - Assign default value for - pureftpd_authd_enable - pureftpd_authsocket: remove detection via pure-config.pl - pureftpd_upload_enable - Remove duplicate pidfile_authd - Simplify script - Bump PORTREVISION for package change Approved by: portmgr (erwin) Modified: branches/2014Q2/ftp/pure-ftpd/Makefile branches/2014Q2/ftp/pure-ftpd/files/pure-ftpd.in Directory Properties: branches/2014Q2/ (props changed) Modified: branches/2014Q2/ftp/pure-ftpd/Makefile ============================================================================== --- branches/2014Q2/ftp/pure-ftpd/Makefile Wed Apr 2 19:46:27 2014 (r349952) +++ branches/2014Q2/ftp/pure-ftpd/Makefile Wed Apr 2 19:53:57 2014 (r349953) @@ -3,7 +3,7 @@ PORTNAME= pure-ftpd PORTVERSION= 1.0.36 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= ftp ipv6 MASTER_SITES= http://download.pureftpd.org/pub/pure-ftpd/releases/ \ ftp://ftp.pureftpd.org/pub/pure-ftpd/releases/ \ Modified: branches/2014Q2/ftp/pure-ftpd/files/pure-ftpd.in ============================================================================== --- branches/2014Q2/ftp/pure-ftpd/files/pure-ftpd.in Wed Apr 2 19:46:27 2014 (r349952) +++ branches/2014Q2/ftp/pure-ftpd/files/pure-ftpd.in Wed Apr 2 19:53:57 2014 (r349953) @@ -16,6 +16,7 @@ # # pureftpd_authd_enable="yes" # pureftpd_authdscript="/full/path/to/auth_script" +# pureftpd_authsocket="/var/run/ftpd.sock" # # Add the following lines to /etc/rc.conf to enable uploadscript daemon: # @@ -30,7 +31,6 @@ rcvar=pureftpd_enable load_rc_config $name command=%%PREFIX%%/sbin/pure-config.pl -command_args="${pureftpd_config} -g${pidfile}" pidfile=/var/run/pure-ftpd.pid procname=pure-ftpd pureftpd_config=${pureftpd_config:-"%%PREFIX%%/etc/pure-ftpd.conf"} @@ -38,15 +38,19 @@ pureftpd_enable=${pureftpd_enable:-"no"} required_files=${pureftpd_config} # authd command_authd=%%PREFIX%%/sbin/pure-authd -command_authd_args="-B -r ${pureftpd_authdscript} -s ${pureftpd_authsocket}" pidfile_authd=/var/run/pure-authd.pid +pureftpd_authd_enable=${pureftpd_authd_enable:-"no"} pureftpd_authdscript=${pureftpd_authdscript:-"%%PREFIX%%/sbin/pure-alwaysfail"} -pureftpd_authsocket=`%%PREFIX%%/sbin/pure-config.pl ${pureftpd_config} | grep -o ' -lextauth:[^ ]*' | cut -d: -f2` +pureftpd_authsocket=${pureftpd_authsocket:-"/var/run/ftpd.sock"} # uploadscript command_upload=%%PREFIX%%/sbin/pure-uploadscript -command_upload_args="-B -r ${pureftpd_uploadscript}" pidfile_uploadscript=/var/run/pure-uploadscript.pid +pureftpd_upload_enable=${pureftpd_upload_enable:-"no"} pureftpd_uploadscript=${pureftpd_uploadscript:-"/usr/bin/touch"} +# command_args +command_args="${pureftpd_config} -g${pidfile}" +command_authd_args="-B -r ${pureftpd_authdscript} -s ${pureftpd_authsocket}" +command_upload_args="-B -r ${pureftpd_uploadscript}" start_precmd=start_precmd start_postcmd=start_postcmd @@ -54,7 +58,7 @@ stop_postcmd=stop_postcmd start_precmd() { - if test -n ${pureftpd_authd_enable:-""} && checkyesno pureftpd_authd_enable && test -x ${pureftpd_authdscript}; then + if checkyesno pureftpd_authd_enable && test -x ${pureftpd_authdscript}; then echo "Starting ${command_authd}." ${command_authd} ${command_authd_args} fi @@ -62,7 +66,7 @@ start_precmd() start_postcmd() { - if test -n ${pureftpd_upload_enable:-""} && checkyesno pureftpd_upload_enable; then + if checkyesno pureftpd_upload_enable; then echo "Starting ${command_upload}." ${command_upload} ${command_upload_args} fi @@ -70,8 +74,8 @@ start_postcmd() stop_postcmd() { - if test -n ${pureftpd_authd_enable:-""} && checkyesno pureftpd_authd_enable; then - pid=$(check_pidfile ${pidfile_authd} ${pidfile_authd} ${command_authd}) + if checkyesno pureftpd_authd_enable; then + pid=$(check_pidfile ${pidfile_authd} ${command_authd}) if [ -z ${pid} ]; then echo "pure-authd not running? (check ${pidfile_authd})." return 1 @@ -81,7 +85,7 @@ stop_postcmd() [ $? -ne 0 ] && [ -z "$rc_force" ] && return 1 wait_for_pids ${pid} fi - if test -n ${pureftpd_upload_enable:-""} && checkyesno pureftpd_upload_enable; then + if checkyesno pureftpd_upload_enable; then pid=$(check_pidfile ${pidfile_uploadscript} ${command_upload}) if [ -z ${pid} ]; then echo "Upload script not running? (check ${pidfile_uploadscript})."
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404021953.s32JrwLQ047882>