[lug-nuts] script not running at nice level 5

From: Scott Tyson (tysons@deepwell.com)
Date: Wed Jan 12 2000 - 15:13:33 PST


Greets -

I have a script that autostarts a program if it stops (Got help on this list
for the script). The only "problem" I'm seeing is that when the program is
re-started, it's nice level is at 10 not 5. I've tried adding a nice -5 to
the script and that didn't work, it actully set the nice level to 15 :(. Any
clues as to why? If I run the program from a crontab they start at a nice
of 5.

My script is as follows:

#!/bin/bash
cd /usr/local/games/quake3/bin
time=30
while true
 do
 ./serverwatch 209.63.173.4:27962 quake3 teamdmstrt
 sleep $time
done

The serverwatch command is a perl script that checks to see if my Quake3
server is responding and if not it finds the process, kills it and then runs
the teamdmstrt script which restarts the server. I'm going to incorporate
the above shell script into the perl script down the road. I used to run
the ./serverwatch script from a crontab at 5 minute intervals and that
worked but its pretty messy IMHO.

Scot

****************************************************************************
* To UNSUBSCRIBE from the list, send a message with "unsubscribe lug-nuts"
* in the message body to majordomo@saclug.org. Please direct other
* questions, comments, or problems to lug-nuts-owner@saclug.org.



This archive was generated by hypermail 2b29 : Fri Feb 25 2000 - 14:29:10 PST