Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Nov 2013 18:25:17 +0400 (MSK)
From:      Sevan Janiyan <venture37@geeklan.co.uk>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        hizel@vyborg.ru
Subject:   ports/183788: [PATCH] sysutils/py27-supervisor: Allow user & location of config file to be specified in rc script
Message-ID:  <201311081425.rA8EPHpS055014@z29.zvq.me>
Resent-Message-ID: <201311081430.rA8EU0vE079931@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         183788
>Category:       ports
>Synopsis:       [PATCH] sysutils/py27-supervisor: Allow user & location of config file to be specified in rc script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 08 14:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Sevan Janiyan
>Release:        FreeBSD 10.0-ALPHA5 amd64
>Organization:
Dream Industries
>Environment:
System: FreeBSD 10.0-ALPHA5 FreeBSD 10.0-ALPHA5 #16 r256272: Thu Oct 10 19:47:50 MSK
>Description:
Define default variables earlier so they can be utilised
Allow the user for which supervisor run under to be specified
Allow the location of the configuration file to be specified
This also stops a warning about the location of configuration file when not runnning as root

Port maintainer (hizel@vyborg.ru) is cc'd.

Generated with FreeBSD Port Tools 0.99_9 (mode: change, diff: SVN)
>How-To-Repeat:
>Fix:

--- py27-supervisor-3.0,1.patch begins here ---
Index: files/supervisord.in
===================================================================
--- files/supervisord.in	(revision 333227)
+++ files/supervisord.in	(working copy)
@@ -9,7 +9,10 @@
 # Add the following line to /etc/rc.conf.local or /etc/rc.conf
 # to enable supervisord:
 #
-# supervisord_enable="YES"
+# supervisord_enable="bool"	Set to NO by default.
+#				Set it to YES to enable supervisord.
+# supervisord_config (patch):	Set to %%PREFIX%%/etc/supervisord.conf by default.
+# supervisord_user (username):	Set to root by default.
 #
 
 . /etc/rc.subr
@@ -17,12 +20,15 @@
 name="supervisord"
 rcvar=supervisord_enable
 
+load_rc_config $name
+
+: ${supervisord_enable="NO"}
+: ${supervisord_config="%%PREFIX%%/etc/supervisord.conf"}
+: ${supervisord_user="root"}
+
 command="%%PREFIX%%/bin/${name}"
+command_args="-u ${supervisord_user} -c ${supervisord_config}"
 command_interpreter="%%PYTHON_CMD%%"
 pidfile="%%PIDDIR%%/${name}.pid"
 
-load_rc_config $name
-
-: ${supervisord_enable="NO"}
-
 run_rc_command "$1"
--- py27-supervisor-3.0,1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311081425.rA8EPHpS055014>