aboutsummaryrefslogtreecommitdiffstats
path: root/ftp
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2014-04-03 03:19:11 +0800
committersunpoet <sunpoet@FreeBSD.org>2014-04-03 03:19:11 +0800
commit81e57d79170562081284cc4d385e64cfbc803d3e (patch)
treebc0fd294bf7af1f92c8ea302ec12b4d4468cef05 /ftp
parentb8bdffdbce6c18f131251ade9df479c33da3ff6f (diff)
downloadfreebsd-ports-gnome-81e57d79170562081284cc4d385e64cfbc803d3e.tar.gz
freebsd-ports-gnome-81e57d79170562081284cc4d385e64cfbc803d3e.tar.zst
freebsd-ports-gnome-81e57d79170562081284cc4d385e64cfbc803d3e.zip
- 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 MFH: 2014Q2
Diffstat (limited to 'ftp')
-rw-r--r--ftp/pure-ftpd/Makefile2
-rw-r--r--ftp/pure-ftpd/files/pure-ftpd.in22
2 files changed, 14 insertions, 10 deletions
diff --git a/ftp/pure-ftpd/Makefile b/ftp/pure-ftpd/Makefile
index ceca80a36ba4..e1221149243a 100644
--- a/ftp/pure-ftpd/Makefile
+++ b/ftp/pure-ftpd/Makefile
@@ -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/ \
diff --git a/ftp/pure-ftpd/files/pure-ftpd.in b/ftp/pure-ftpd/files/pure-ftpd.in
index a0538b74e2e8..7c5c7d9fb87f 100644
--- a/ftp/pure-ftpd/files/pure-ftpd.in
+++ b/ftp/pure-ftpd/files/pure-ftpd.in
@@ -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})."