Date: Mon, 04 Feb 2013 15:48:07 +0400 From: Andrej Zverev <andrej.zverev@gmail.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/175823: [patch] www/nginx - better handling of profiles Message-ID: <E1U2KWt-000FpQ-Nx@sunner.semmy.ru> Resent-Message-ID: <201302041150.r14Bo1N8039533@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 175823 >Category: ports >Synopsis: [patch] www/nginx - better handling of profiles >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Mon Feb 04 11:50:01 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Andrej Zverev >Release: >Organization: >Environment: >Description: By default using profiles using rc.d/nginx will create .pid file in NGINX_RUNDIR (/var/run/) and names it as profile name + '.pid'. This can make surpise for people who will name profile as syslog, exim, etc. Following patch add prefix for pid file as "nginx_", so instead of /var/run/syslog.pid nginx will create /var/run/nginx_syslog.pid. People who are using nginx's profiles must be aware of these changes. No bump portrevision since this not default behavior. >How-To-Repeat: >Fix: --- nginx_coll.diff begins here --- Index: www/nginx/files/nginx.in =================================================================== --- www/nginx/files/nginx.in (revision 311575) +++ www/nginx/files/nginx.in (working copy) @@ -33,6 +33,7 @@ upgrade_cmd="nginx_upgrade" command="%%PREFIX%%/sbin/nginx" _pidprefix="%%NGINX_RUNDIR%%" +_pidprofile_prefix="nginx_" pidfile="${_pidprefix}/${name}.pid" _tmpprefix="%%NGINX_TMPDIR%%" required_files=%%PREFIX%%/etc/nginx/nginx.conf @@ -47,7 +48,7 @@ if [ -n "$2" ]; then profile="$2" if [ "x${nginx_profiles}" != "x" ]; then - pidfile="${_pidprefix}/${profile}.pid" + pidfile="${_pidprefix}/${_pidprofile_prefix}${profile}.pid" eval nginx_configfile="\${nginx_${profile}_configfile:-}" if [ "x${nginx_configfile}" = "x" ]; then echo "You must define a configuration file (nginx_${profile}_configfile)" --- nginx_coll.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1U2KWt-000FpQ-Nx>