Annotation of /trunk/mysql5/mysql.rc
Parent Directory | Revision Log
Revision 246 -
(hide annotations)
(download)
Sun Jul 8 10:45:47 2007 UTC (17 years, 4 months ago) by niro
File size: 843 byte(s)
Sun Jul 8 10:45:47 2007 UTC (17 years, 4 months ago) by niro
File size: 843 byte(s)
- fixed error piping and removed --user option -> now declared in my.cnf
1 | niro | 245 | #!/bin/bash |
2 | niro | 246 | # $Header: /root/magellan-cvs/src/mysql5/mysql.rc,v 1.2 2007-07-08 10:45:47 niro Exp $ |
3 | niro | 245 | |
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 | niro | 246 | /usr/bin/mysqld_safe > /dev/null 2>&1 & |
20 | niro | 245 | 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 |