List:Commits« Previous MessageNext Message »
From:mcbrown Date:May 16 2008 4:02pm
Subject:svn commit - mysqldoc@docsrva: r10758 - trunk/refman-common
View as plain text  
Author: mcbrown
Date: 2008-05-16 16:02:06 +0200 (Fri, 16 May 2008)
New Revision: 10758

Log:
Docs Bug #35286



Modified:
   trunk/refman-common/ha-heartbeat.xml


Modified: trunk/refman-common/ha-heartbeat.xml
===================================================================
--- trunk/refman-common/ha-heartbeat.xml	2008-05-16 13:41:57 UTC (rev 10757)
+++ trunk/refman-common/ha-heartbeat.xml	2008-05-16 14:02:06 UTC (rev 10758)
Changed blocks: 1, Lines Added: 46, Lines Deleted: 0; 1322 bytes

@@ -341,6 +341,52 @@
           release into the <filename>/etc/ha.d/resources.d</filename>
           directory.
         </para>
+
+        <para>
+          If this file is not available in your distribution, you can
+          use the following as the contents of the
+          <filename>/etc/ha.d/resource.d/mysql.resource</filename> file:
+        </para>
+
+<programlisting>
+#!/bin/bash
+#
+# This script is inteded to be used as resource script by heartbeat
+#
+# Mar 2006 by Monty Taylor
+#
+###
+
+. /etc/ha.d/shellfuncs
+
+case "$1" in
+    start)
+        res=`/etc/init.d/mysql start`
+        ret=$?
+        ha_log $res
+        exit $ret
+        ;;
+    stop)
+        res=`/etc/init.d/mysql stop`
+        ret=$?
+        ha_log $res
+        exit $ret
+        ;;
+    status)
+        if [ `ps -ef | grep '[m]ysqld'` ] ; then
+           echo "running"
+        else
+           echo "stopped"
+        fi
+        ;;
+    *)
+        echo "Usage: mysql {start|stop|status}"
+        exit 1
+        ;;
+esac
+
+exit 0
+        </programlisting>
       </listitem>
 
     </itemizedlist>


Thread
svn commit - mysqldoc@docsrva: r10758 - trunk/refman-commonmcbrown16 May