Magellan Linux

Annotation of /trunk/mysql5/mysql.rc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 245 - (hide annotations) (download)
Sun Jul 8 00:52:01 2007 UTC (16 years, 10 months ago) by niro
File size: 855 byte(s)
mysqld initscript

1 niro 245 #!/bin/bash
2     # $Header: /root/magellan-cvs/src/mysql5/mysql.rc,v 1.1 2007-07-08 00:52:01 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/sysconfig/rc
14     source $rc_functions
15    
16     case "$1" in
17     start)
18     echo -e ${COLOREDSTAR}"Starting mysql daemon ..."
19     /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
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