Re: Scripting Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That seems to have fixed that.

How hard would it be to record the process and then kill it in a cron job?

Thanks.

-------Original Message-------
 
From: psyche-list@redhat.com
Date: Saturday, January 11, 2003 3:11:59 PM
To: psyche-list@redhat.com
Subject: Re: Scripting Question
 
On Saturday 11 January 2003 11:08, Thom Paine uttered:
> Here is the output. Sorry it's not wrapped. But it is a dump of my server
> while the quake3 server is running.
>
> It is process 6753.
>
> Thanks for your help.
 
Try this:
 
#!/bin/sh
quake3dir="/usr/local/games/quake3"
binname="q3ded"
 
cd $quake3dir
process=`ps auxwww | grep q3ded | grep -v grep | awk '{ print $2 }'`
if [ -z $process ]; then
echo "Couldn't find quake 3 running. Restarting it"
nohup ./q3ded +set dedicated 1 +exec server.cfg &
echo ""
fi 
 
 
-- 
Jesse Keating RHCE MCSE
For Web Services and Linux Consulting, Visit --> j2Solutions.net
Mondo DevTeam (www.mondorescue.org)
 
Was I helpful? Let others know:
http://svcs.affero.net/rm.php?r=jkeating
 
 
 
-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list
. 



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux