mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 02:08:49 -04:00
50 lines
821 B
Bash
50 lines
821 B
Bash
#!@RCD_SCRIPTS_SHELL@
|
|
#
|
|
# $NetBSD: ndbmtd.sh,v 1.2 2015/04/04 03:28:05 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
|