blob: 86824c685ea6966329e034832550c4bf8c324683 (
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
|
#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: ndbmtd.sh,v 1.1.1.1 2014/12/01 05:58:03 jnemeth Exp $
#
# PROVIDE: ndbmtd
# REQUIRE: DAEMON LOGIN mountall
# KEYWORD: shutdown
#
# You will need to set some variables in /etc/rc.conf to start MySQL:
#
# ndbmtd=YES
#
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="ndbmtd"
rcvar=${name}
command="@PREFIX@/sbin/$name"
mysqld_start()
{
@ECHO@ "Starting ${name}."
cd @PREFIX@
${command}
}
if [ -f /etc/rc.subr -a -d /etc/rc.d -a -f /etc/rc.d/DAEMON ]; then
load_rc_config $name
pidfile="/var/run/${name}.pid"
run_rc_command "$1"
else
if [ -f /etc/rc.conf ]; then
. /etc/rc.conf
fi
pidfile="/var/run/${name}.pid"
case "$1" in
stop)
if [ -r "${pidfile}" ]; then
@ECHO@ "Stopping ${name}."
kill `@CAT@ ${pidfile}`
fi
;;
start
eval ${start_cmd}
;;
esac
fi
|