5
# Required-Start: $remote_fs $syslog mysql-ndb-mgm
6
# Required-Stop: $remote_fs $syslog mysql-ndb-mgm
7
# Should-Start: $network $named $time
8
# Should-Stop: $network $named $time
9
# Default-Start: 2 3 4 5
11
# Short-Description: Start and stop the mysql database cluster server daemon
12
# Description: Controls the MySQL NDB Data Node daemon "ndbd".
17
${DEBIAN_SCRIPT_DEBUG:+ set -v -x}
20
SELF=$(cd $(dirname $0); pwd -P)/$(basename $0)
22
CONF=/etc/mysql/my.cnf
23
export HOME=/etc/mysql/
25
# Safeguard (relative paths, core dumps..)
29
# Exit *silently* if we're not supposed to be started.
31
# The Debian scripts should execute these scripts to stop and start
32
# the daemon when upgrading if it is started. On the other hand it should
33
# remain silently if the server has not even been configured.
34
# See /usr/share/doc/mysql-server-*/README.Debian for more information.
35
test -x $DAEMON || exit 0
36
if $DAEMON --help | grep -q '^ndb-connectstring.*No default value'; then exit 0; fi
37
. /lib/lsb/init-functions
45
# Creatign a PID file does not work as the master process forks
46
# a child with different PID and then terminates itself.
47
log_daemon_msg "Starting MySQL NDB Data Node" "ndbd"
48
if start-stop-daemon \
56
log_warning_msg "Please take a look at the syslog."
62
# Perform an initial start of ndbd
63
log_daemon_msg "Initial start of MySQL NDB Data Node" "ndbd"
64
if start-stop-daemon \
73
log_warning_msg "Please take a look at the syslog."
79
log_daemon_msg "Stopping MySQL NDB Data Node" "ndbd"
80
if start-stop-daemon \
92
'restart'|'force-reload')
93
set +e; $SELF stop; set -e
98
echo "Usage: $SELF start|start-initial|stop|restart|force-reload"
99
echo " * start-initial starts ndbd with '--initial'"