blob: 6c35ed30b926036dcc4bbe4ef7928f9b37cbedb5 (
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
|
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: cvm.sh,v 1.1.1.1 2005/07/20 03:28:42 schmonz Exp $
#
# PROVIDE: cvm
# REQUIRE: LOGIN
name="cvm"
# User-settable rc.conf variables and their default values:
: ${cvm_postenv:="CVM_LOOKUP_SECRET=''"}
: ${cvm_datalimit:="9000000"}
: ${cvm_module:="qmail"}
: ${cvm_protocol:="local"}
: ${cvm_log:="YES"}
: ${cvm_logcmd:="logger -t nb${name} -p auth.info"}
: ${cvm_nologcmd:="@LOCALBASE@/bin/multilog -*"}
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
rcvar=${name}
command="@LOCALBASE@/bin/cvm-${cvm_module}"
start_precmd="cvm_precmd"
cvm_precmd()
{
if [ -f /etc/rc.subr ]; then
checkyesno cvm_log || cvm_logcmd=${cvm_nologcmd}
fi
umask 0
command="@SETENV@ - ${cvm_postenv} @LOCALBASE@/bin/softlimit -m ${cvm_datalimit} @LOCALBASE@/bin/cvm-${cvm_module} cvm-${cvm_protocol}:@VARBASE@/run/cvm-${cvm_module} 2>&1 | @LOCALBASE@/bin/setuidgid cvmlog ${cvm_logcmd}"
command_args="&"
rc_flags=""
}
if [ -f /etc/rc.subr ]; then
load_rc_config $name
run_rc_command "$1"
else
@ECHO_N@ " ${name}"
cvm_precmd
eval ${command} ${cvm_flags} ${command_args}
fi
|