]> git.pld-linux.org Git - packages/mysql.git/blame - mysql-ndb-cpc.init
- rel 2; drop certs dir for now (change not complete, breaking deps).
[packages/mysql.git] / mysql-ndb-cpc.init
CommitLineData
36eada1b
AM
1#!/bin/sh
2#
3# mysql-ndb-cpc This shell script takes care of starting and stopping mysql-ndb-cpc.
4#
5# chkconfig: 2345 80 30
6# description: mysql-ndb-cpc is a mysql NDB engine
98f16f2d 7#
36eada1b
AM
8# processname: ndbd
9
10# Source function library.
11. /etc/rc.d/init.d/functions
12
13# Source networking configuration.
14. /etc/sysconfig/network
15
16# Source oident configureation.
17if [ -f /etc/sysconfig/mysql-ndb-cpc ]; then
18 . /etc/sysconfig/mysql-ndb-cpc
19fi
20
21# Check that networking is up.
22if is_yes "${NETWORKING}"; then
23 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
24 msg_network_down mysql-ndb-cpc
25 exit 1
26 fi
27else
28 exit 0
29fi
30
9b4ed6cb 31start() {
36eada1b
AM
32 # Start daemons.
33 if [ ! -f /var/lock/subsys/mysql-ndb-cpc ]; then
34 msg_starting "mysql ndb_cpcd"
35 daemon ndb_cpcd $MYSQL_NDB_CPC_OPT
36 RETVAL=$?
37 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/mysql-ndb-cpc
38 else
39 msg_already_running "mysql ndb_cpcd"
40 fi
9b4ed6cb
ER
41}
42
43stop() {
36eada1b
AM
44 # Stop daemons.
45 if [ -f /var/lock/subsys/mysql-ndb-cpc ]; then
46 msg_stopping "mysql ndb_cpcd"
47 killproc ndbd
48 rm -f /var/lock/subsys/mysql-ndb-cpc >/dev/null 2>&1
49 else
50 msg_not_running "mysql ndb_cpcd"
98f16f2d 51 fi
9b4ed6cb
ER
52}
53
54RETVAL=0
55# See how we were called.
56case "$1" in
57 start)
58 start
59 ;;
60 stop)
61 stop
36eada1b
AM
62 ;;
63 restart|force-reload)
9b4ed6cb
ER
64 stop
65 start
36eada1b
AM
66 ;;
67 status)
68 status ndb_cpcd
69 exit $?
70 ;;
36eada1b
AM
71 *)
72 msg_usage "$0 {start|stop|restart|force-reload|status}"
73 exit 3
74esac
75
76exit $RETVAL
This page took 1.285537 seconds and 4 git commands to generate.