1552f48bdc
from frantisek holop, ok brad (MAINTAINER)
28 lines
541 B
Bash
Executable File
28 lines
541 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $OpenBSD: mysqld.rc,v 1.6 2010/12/12 20:18:40 jasper Exp $
|
|
|
|
. /etc/rc.d/rc.subr
|
|
|
|
daemon="${TRUEPREFIX}/bin/mysqld_safe"
|
|
rc_reload=NO
|
|
|
|
rc_check() {
|
|
${TRUEPREFIX}/bin/mysqladmin -s ping >/dev/null
|
|
}
|
|
|
|
rc_start() {
|
|
su -c ${daemon_class:-daemon} -s ${daemon_shell:-/bin/sh} \
|
|
${daemon_user:-root} -c "${daemon} ${daemon_flags}" >/dev/null 2>&1 &
|
|
}
|
|
|
|
rc_stop() {
|
|
${TRUEPREFIX}/bin/mysqladmin -s shutdown
|
|
if [ $? -gt 0 ]; then
|
|
pkill -f "^/bin/sh ${daemon}"
|
|
pkill -U _mysql -f "^${TRUEPREFIX}/libexec/mysqld"
|
|
fi
|
|
}
|
|
|
|
rc_cmd $1
|