blob: 0c1c9d71a7f5c94021410df68eb18d92730081e0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#!/bin/sh
#
# tracd startup
#
# $FreeBSD$
# PROVIDE: tracd
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable or configure tracd:
# tracd_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable tracd.
# tracd_listen (str): The host name or IP address to bind tracd to.
# By default tracd listens 0.0.0.0, i.e. all the
# available addresses on all interfaces.
# tracd_port (str): The port number to bind to, 80 by default.
# tracd_pidfile (str): When daemonizing, file to which to write pid
# if not to /var/run/tracd.pid.
# tracd_envdir (str): Directory of the project environments. Set to
# "/home/trac" by default.
# tracd_env (str): The project environment name while using single
# environment mode. The default is empty, meaning
# multiproject mode.
# tracd_args (str): Extra arguments passed to tracd startup
# command. Empty by default.
#
. /etc/rc.subr
name="tracd"
rcvar=tracd_enable
tracd_enable=${tracd_enable:-"NO"}
tracd_listen=${tracd_listen:-"0.0.0.0"}
tracd_port=${tracd_port:-"80"}
tracd_pidfile=${tracd_pidfile:-"/var/run/tracd.pid"}
tracd_envdir=${tracd_envdir:-"/home/trac"}
tracd_tracenv=${tracd_tracenv:-""}
tracd_args=${tracd_args:-""}
load_rc_config ${name}
command_args="--daemonize --hostname=${tracd_listen} --port=${tracd_port}"
command_args="${command_args} --pidfile=${tracd_pidfile} ${tracd_args}"
required_dirs=${tracd_envdir}
pidfile=${tracd_pidfile}
if [ -z "${tracd_tracenv}" ]; then
_trac_env="--env-parent-dir ${tracd_envdir}"
else
_trac_env="${tracd_envdir}/${tracd_tracenv}"
command_args="${command_args} --single-env"
fi
command_args="%%PREFIX%%/bin/tracd ${command_args} ${_trac_env}"
command="%%PYTHON_CMD%%"
run_rc_command $1
|