ports/154909: [patch] www/redmine: rc script with alternate user/group

David Demelier demelier.david at gmail.com
Sun Feb 20 12:50:11 UTC 2011


>Number:         154909
>Category:       ports
>Synopsis:       [patch] www/redmine: rc script with alternate user/group
>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:   Sun Feb 20 12:50:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     David Demelier
>Release:        8.2-RELEASE
>Organization:
>Environment:
FreeBSD Abricot.malikania.fr 8.2-RELEASE FreeBSD 8.2-RELEASE #10: Fri Feb 18 08:48:24 CET 2011     root at Abricot.malikania.fr:/usr/obj/usr/src/sys/Abricot  i386

>Description:
The current www/redmine rc script use by default www as user and www as group. This is obviously better than root:wheel but alternatives configuration may be fine for alternate purpose.

For example I prefere adding a redmine user to run the thin server. This patch allow the user to set thin_user and group_user in his /etc/rc.conf to change the -u -g thin flags.
>How-To-Repeat:

>Fix:
--- redmine.in.diff begins here ---
--- files/redmine.in.orig	2011-02-20 13:36:49.000000000 +0100
+++ files/redmine.in	2011-02-20 13:41:05.000000000 +0100
@@ -12,6 +12,8 @@
 #                               Set it to "YES" to enable redmine.
 # redmine_flags (str):          Custom additional arguments to be passed
 #                               to redmine.
+# thin_user (str):		Set the thin user. (default: www)
+# thin_group (str):		Set the thin group. (default: www)
 
 . /etc/rc.subr
 
@@ -26,8 +28,10 @@
 # set defaults
 : ${redmine_enable="NO"}
 : ${redmine_flags="-a 0.0.0.0 -p 3000 -e production"}
+: ${thin_user="www"}
+: ${thin_group="www"}
 
-command_args="-d -D -c %%WWWDIR%% -u www -g www"
+command_args="-d -D -c %%WWWDIR%% -u ${thin_user} -g ${thin_group}"
 start_cmd="%%PREFIX%%/bin/thin ${command_args} ${redmine_flags} start"
 
 run_rc_command "$1"
--- redmine.in.diff ends here ---

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



More information about the freebsd-ports-bugs mailing list