Magellan Linux

Contents of /trunk/mysql5/mysql.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 864 - (show annotations) (download)
Mon Jul 6 17:48:07 2009 UTC (14 years, 9 months ago) by niro
File size: 840 byte(s)
-rc config moved to /etc/conf.d

1 #!/bin/bash
2 # $Header: /root/magellan-cvs/src/mysql5/mysql.rc,v 1.3 2009-07-06 17:48:07 niro Exp $
3
4 #%rlevels: 3:s 4:s 5:s 0:k 1:k 2:k 6:k
5 #%start: 60
6 #%stop: 80
7
8 #deps
9 #%needs:
10 #%before:
11 #%after:
12
13 source /etc/conf.d/rc
14 source $rc_functions
15
16 case "$1" in
17 start)
18 echo -e ${COLOREDSTAR}"Starting mysql daemon ..."
19 /usr/bin/mysqld_safe > /dev/null 2>&1 &
20 evaluate_retval
21
22 update_svcstatus $1
23 splash svc_started "$(basename $0)" 0
24 ;;
25
26 stop)
27 echo -e ${COLOREDSTAR}"Stopping mysql daemon ..."
28 start-stop-daemon --stop --quiet \
29 --pidfile=/var/run/mysqld/mysqld.pid --retry 20
30 evaluate_retval
31
32 update_svcstatus $1
33 splash svc_stopped "$(basename $0)" 0
34 ;;
35
36 restart)
37 $0 stop
38 sleep 1
39 $0 start
40 ;;
41
42 status)
43 statusproc /usr/sbin/mysqld
44 ;;
45
46 *)
47 echo "Usage: $0 {start|stop|restart|status}"
48 exit 1
49 ;;
50 esac