Aloha,
ok so use this script.
#!/bin/sh
pid=`ps -aux | grep mdq| grep -v grep | awk '{print $2}'`
if /bin/test "$pid"
then
kill $pid
fi
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 28, 2000 4:57 AM
Subject: RE: [FW1] automating script to restart MDQ
> I am running Nokia 650 with IPSO 2.3. It's a modified form of BSD unix. It
> does not support ksh.
>
> Kamran
>
> -----Original Message-----
> From: Ryan Joffs [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, September 27, 2000 8:29 PM
> To: 'Fw-1-Mailinglis' (E-mail); [EMAIL PROTECTED]
> Subject: Re: [FW1] automating script to restart MDQ
>
>
>
> Aloha,
>
> First of all don't use csh for scripts. it just doesn't work.
>
> Try this script
> #!/bin/ksh
> # uncomment one and only one of the following statements to set the pid
> variable.
> # the first is a Linux and the second is Solaris this script works on
> either. with the
> # correct ps statement
> #pid=`ps -aux | grep mdq | grep -v grep | awk '{print $2}'`
> #pid=`ps -ef | grep mdq | grep -v grep | awk '{print $2}'`
>
> if /usr/bin/test "$pid"
> then
> kill $pid
> fi
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, September 27, 2000 9:22 AM
> Subject: [FW1] automating script to restart MDQ
>
>
> >
> > Hi All,
> >
> > I have a script but it does not seem to work. I also need to automate
the
> > script to
> > run every 60 minutes through some kind of cron job. Can you tell me
what
> is
> > wrong with the script and how can I automate it. I would appreciate a
> quick
> > response.
> >
> > Here is the script (restartmdq) I have written.
> >
> >
> > #!/bin/csh
> > # restart mdq... pick up any "forgotten" mail
> > # ---------------------------------------------------------------
> > set pid = ( ps ugxaw | grep mdq | grep -v grep | awk '{print $2}' )
> > if ( "$pid" != "" ) then
> > kill "$pid"
> > endif
> > # FW-1 in.asmtpd will automatically restart another mdq
> >
> >
> >
> > When I type set I don't see the pid being set to the mdq pid.
> >
> > Can someone help. We are having to manually restart the mdq process.
> >
> > Thanks in advance
> >
> > Kamran
> >
> >
> >
> >
> >
>
============================================================================
> ====
> > To unsubscribe from this mailing list, please see the instructions
at
> > http://www.checkpoint.com/services/mailing.html
> >
>
============================================================================
> ====
>
>
>
>
============================================================================
> ====
> To unsubscribe from this mailing list, please see the instructions at
> http://www.checkpoint.com/services/mailing.html
>
============================================================================
> ====
================================================================================
To unsubscribe from this mailing list, please see the instructions at
http://www.checkpoint.com/services/mailing.html
================================================================================