[ic] Need to restart ic continuously

Ed LaFrance edl@newmediaems.com
Thu, 12 Oct 2000 14:50:47 -0700


You know, I should pay more attention.  You are just setting a session 
variable here.  Take all the path stuff out from in from of the commands, 
and remove the output redirect (assuming the commands do not normally 
produce output):

#!/bin/bash
var=`ps -ax | grep "servername/ic" | grep -v -c grep`
if [ 0 -eq $var ]
then
MINIVEND_DBFILE=1
export MINIVEND_DBFILE
/my/local/directory/ic/bin/restart &
fi
<<

- Ed L.


At 02:37 PM 10/12/00 -0700, you wrote:
>Ed -- thanks for the help.
>
>I don't really understand my own problem either.  If I did, I would have a 
>clue as to where to look, or start to try to fix it.
>
>When I try to run the below script, I get the following output:
>
>./restart_mvend.cgi: /my/local/directory/ic/bin/MINIVEND_DBFILE=1: no such 
>file or directory
>
>When I am in /my/local/directory/ic/bin  at the command line I can do:
>
>MINIVEND_DBFILE=1
>
>without error.
>
>
>HOW do I make the script do this?
>
>
>>From: Ed LaFrance <edl@newmediaems.com>
>>Date: Thu, 12 Oct 2000 08:49:57 -0700
>>
>>I guess I don't understand something about your problem.  Just add those
>>lines to the shell script.  If they generate output, redirect it to the
>>null device.  Does this work?
>>
>>
>>#!/bin/bash
>>var=`ps -ax | grep "servername/ic" | grep -v -c grep`
>>if [ 0 -eq $var ]
>>then
>>/my/local/directory/ic/bin/MINIVEND_DBFILE=1 >/dev/null
>>/my/local/directory/ic/bin/export MINIVEND_DBFILE >/dev/null
>>/my/local/directory/ic/bin/restart &
>>fi
>><<
>>
>>- Ed L.
>>
>>
>>>[snip]  I just need a script that does:
>>>
>>>---
>>>MINIVEND_DBFILE=1
>>>export MINIVEND_DBFILE
>>>restart
>>>---
>
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at 
>http://profiles.msn.com.
>
>
>_______________________________________________
>Interchange-users mailing list
>Interchange-users@www.minivend.com
>http://www.minivend.com/mailman/listinfo/interchange-users

 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
New Media E.M.S.               Software Solutions for Business
463 Main St., Suite D          edl@newmediaems.com
Placerville, CA  95667         http://www.newmediaems.com
(530) 622-9421                 (530) 622-9426 fax
 >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>