From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rezk Mekhael Newsgroups: gmane.os.tru64.managers Subject: mysql start script Date: Wed, 15 Oct 2003 09:57:17 -0700 Sender: tru64-unix-managers-owner@ornl.gov Message-ID: <003401c3933d$6460cee0$96c46bc7@clunet.2k> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1066237062 3779 80.91.224.253 (15 Oct 2003 16:57:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Oct 2003 16:57:42 +0000 (UTC) Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Wed Oct 15 18:57:40 2003 Return-path: Original-Received: from sws1.ornl.gov ([160.91.1.101]) by deer.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 1A9oxw-0006Xt-00 for ; Wed, 15 Oct 2003 18:57:40 +0200 Original-Received: (qmail 12440 invoked by uid 5); 15 Oct 2003 16:57:31 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 12424 invoked by uid 49493); 15 Oct 2003 16:57:31 -0000 Original-Received: from rezk@clunet.edu by sws1 by uid 49491 with qmail-scanner-1.16 (iscan: v3.1/v5.600-1011/622/49252. clamscan: 20030605. spamassassin: 2.55. Clear:SA:0(-2.6/5.0):. Processed in 0.624663 secs); 15 Oct 2003 16:57:31 -0000 Original-Received: from unknown (HELO emroute1.cind.ornl.gov) (160.91.4.119) by 0 with SMTP; 15 Oct 2003 16:57:30 -0000 Original-Received: from emroute1.cind.ornl.gov (localhost [127.0.0.1]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HMT00KJS5RSY4@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 15 Oct 2003 12:57:29 -0400 (EDT) Original-Received: from clunet.edu (robles.callutheran.edu [192.153.159.11]) by emroute1.cind.ornl.gov (PMDF V6.2-X17 #30669) with ESMTP id <0HMT00FHV5RLZ8@emroute1.cind.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Wed, 15 Oct 2003 12:57:22 -0400 (EDT) Original-Received: from oscar by clunet.edu (8.12.8/1.1.29.3/14May03-1207PM) id h9FGvaXZ221729; Wed, 15 Oct 2003 09:57:37 -0700 (PDT) Original-To: "Tru64 Group \(Tru64 Group\)" X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Mailer: Microsoft Outlook, Build 10.0.2627 Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-MailScanner-Information: Please contact the ISP for more information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: Xref: main.gmane.org gmane.os.tru64.managers:5582 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:5582 Hi Managers, I have 2 questions: I have Ds20 with OS 5.1v, I am running mysql server, and some time it stop for that I create csh script to watch it, and if goes down restart it. 1) The Script: #!/bin/csh # checks the mysql server daemon and restart if needed # customized for Mysql on lupine Rezk Mekhael 10/2003 umask 077 set tmp=/tmp/chkmysql.$$ set manager=rezk@clunet.edu ps ax > $tmp if ( `grep -c "mysql" $tmp` != "0" ) then echo "listener is running" > /dev/null else /sbin/rc3.d/s100mysql echo "Mysql Server is down, starting it up" > /tmp/message.$$ /usr/bin/mail $manager < /tmp/message.$$ rm -r /tmp/message.$$ endif rm -f $tmp ======================================= 2) This file "/sbin/rc3.d/s100mysql" contains: cd /usr/local/mysql; bin/safe_mysqld --user=mysql My questions: 1) I can run this file S100mysql by hand but the script can not run it, why? 2) Does any one have a startup script for mysql in /sbin/rc3.d? -rwxrwxr-x 1 root bin 53 Oct 15 00:17 /sbin/rc3.d/s100mysql lrwxrwxrwx 1 root system 37 Sep 12 12:06 /usr/local/mysql -> mysql-max-4.0.13-dec-osf5.1-alphaev67 lrwxrwxrwx 1 1265 system 11 Sep 12 12:06 /usr/local/mysql/bin/safe_mysqld -> mysqld_safe -- Sincerely, Rezk Mekhael -- *** Incoming / Outgoing Mail scanned for known Viruses by CLUnet ***