mirror of
https://git.freebsd.org/ports.git
synced 2025-05-25 07:26:29 -04:00
Use ruby${RUBY_SUFFIX} or libruby${RUBY_SHLIBVER} directly. It also fixes the inconsistency in lang/ruby{26,27,30}/{Makefile,pkg-plist}.
38 lines
1 KiB
Bash
38 lines
1 KiB
Bash
#!/bin/sh
|
|
|
|
# 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%%RUBY_SUFFIX%%
|
|
|
|
pidfile="%%WWWDIR%%/tmp/pids/thin.pid"
|
|
|
|
load_rc_config $name
|
|
|
|
# add /usr/local/bin to path
|
|
export PATH=$PATH:%%PREFIX%%/bin
|
|
|
|
# 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"
|