Contents of /trunk/mysql5/mysql.rc
Parent Directory | Revision Log
Revision 1372 -
(show annotations)
(download)
Wed Jun 29 07:14:08 2011 UTC (13 years, 4 months ago) by niro
File size: 817 byte(s)
Wed Jun 29 07:14:08 2011 UTC (13 years, 4 months ago) by niro
File size: 817 byte(s)
-use rc_print() functions
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 | rc_print "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 | rc_print "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 | rc_echo "Usage: $0 {start|stop|restart|status}" |
48 | exit 1 |
49 | ;; |
50 | esac |