1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-14 03:10:47 +00:00
freebsd-ports/www/redmine/files/redmine.in
Doug Barton 83eb2c3700 In the rc.d scripts, change assignments to rcvar to use the
literal name_enable wherever possible, and ${name}_enable
when it's not, to prepare for the demise of set_rcvar().

In cases where I had to hand-edit unusual instances also
modify formatting slightly to be more uniform (and in
some cases, correct). This includes adding some $FreeBSD$
tags, and most importantly moving rcvar= to right after
name= so it's clear that one is derived from the other.
2012-01-14 08:57:23 +00:00

38 lines
998 B
Bash

#!/bin/sh
# $FreeBSD$
# PROVIDE: redmine
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf[.local] to enable redmine
#
# redmine_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable redmine.
# redmine_flags (str): Custom additional arguments to be passed
# to redmine.
# redmine_user (str): User account to run thin with. (default: %%WWWOWN%%)
# redmine_group (str): Group to run thin with. (default: %%WWWGRP%%)
. /etc/rc.subr
name="redmine"
rcvar=redmine_enable
command=%%RUBY_NAME%%
pidfile="%%WWWDIR%%/tmp/pids/thin.pid"
load_rc_config $name
# set defaults
: ${redmine_enable="NO"}
: ${redmine_flags="-a 0.0.0.0 -p 3000 -e production"}
: ${redmine_user="%%WWWOWN%%"}
: ${redmine_group="%%WWWGRP%%"}
command_args="-d -D -c %%WWWDIR%% -u ${redmine_user} -g ${redmine_group}"
start_cmd="%%PREFIX%%/bin/thin ${command_args} ${redmine_flags} start"
run_rc_command "$1"