aboutsummaryrefslogtreecommitdiffstats
path: root/www/redmine
diff options
context:
space:
mode:
authordougb <dougb@FreeBSD.org>2010-03-15 05:14:23 +0800
committerdougb <dougb@FreeBSD.org>2010-03-15 05:14:23 +0800
commita194e0866a7d11a952057d952bfa530d5a07b20e (patch)
tree684b52b52420b5b56c1d0d4c89cc0a61fe6e0660 /www/redmine
parente01d9b39b2b11be755ae5f2ecb695d9695de627a (diff)
downloadfreebsd-ports-gnome-a194e0866a7d11a952057d952bfa530d5a07b20e.tar.gz
freebsd-ports-gnome-a194e0866a7d11a952057d952bfa530d5a07b20e.tar.zst
freebsd-ports-gnome-a194e0866a7d11a952057d952bfa530d5a07b20e.zip
Tune up the script a bit:
1. Add a $FreeBSD$ 2. Change REQUIRE: DAEMON to LOGIN since this service runs as a non-root user 3. Fill in /etc/rc.subr 4. Instead of a temporary variable, just SUB out %%WWWDIR%% everywhere 5. Move the -u and -g options to command_args 6. Don't include _flags in command_args Approved by: maintainer
Diffstat (limited to 'www/redmine')
-rw-r--r--www/redmine/files/redmine.in15
1 files changed, 8 insertions, 7 deletions
diff --git a/www/redmine/files/redmine.in b/www/redmine/files/redmine.in
index 1d224aefe2ef..f85a06bd1141 100644
--- a/www/redmine/files/redmine.in
+++ b/www/redmine/files/redmine.in
@@ -1,7 +1,9 @@
#!/bin/sh
+# $FreeBSD$
+
# PROVIDE: redmine
-# REQUIRE: DAEMON
+# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf[.local] to enable redmine
@@ -10,23 +12,22 @@
# Set it to "YES" to enable redmine.
# redmine_flags (str): Custom additional arguments to be passed
# to redmine.
-#
-. %%RC_SUBR%%
+. /etc/rc.subr
name="redmine"
rcvar=`set_rcvar`
command=%%RUBY_NAME%%
-redmine_home="%%WWWDIR%%"
-pidfile="${redmine_home}/tmp/pids/thin.pid"
+
+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 -u www -g www"}
+: ${redmine_flags="-a 0.0.0.0 -p 3000 -e production"}
-command_args="-d -D -c ${redmine_home} ${redmine_flags}"
+command_args="-d -D -c %%WWWDIR%% -u www -g www"
start_cmd="%%PREFIX%%/bin/thin ${command_args} start"
run_rc_command "$1"