blob: d3037a4076459d0f4aa54a3c8d13bf88e15611bd (
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
|
#!/bin/sh
# PROVIDE: fiche
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add some of the following variables to /etc/rc.conf to configure fiche:
# fiche_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable fiche.
# fiche_domain (str): Default "localhost"
# fiche_options (str): Additional flags Default ""
# fiche_output (str): Default "/usr/local/www/fiche"
# fiche_logfile (str): Default "/var/log/fiche/fiche.log"
. /etc/rc.subr
name="fiche"
rcvar=fiche_enable
load_rc_config $name
: ${fiche_enable="NO"}
: ${fiche_pidfile="/var/run/${name}.pid"}
: ${fiche_options=""}
: ${fiche_output="%%WWWDIR%%"}
: ${fiche_domain="localhost"}
: ${fiche_logfile="/var/log/${name}/${name}.log"}
start_precmd="${name}_prestart"
pidfile="${fiche_pidfile}"
procname="%%PREFIX%%/sbin/fiche"
command="/usr/sbin/daemon"
command_args="-fp ${pidfile} %%PREFIX%%/sbin/fiche \
-o ${fiche_output} \
-d ${fiche_domain} \
-l ${fiche_logfile} \
${fiche_options}"
fiche_prestart() {
install -d -o 477 -g 477 -m 755 /var/log/${name}
}
run_rc_command "$1"
|