LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 12-02-2002, 11:22 PM   #1
ubien
Member
 
Registered: Oct 2002
Distribution: RH 8.0 and fluxbox
Posts: 122

Rep: Reputation: 15
if (ping host = true) killall wine, how?


this goes out to all your hardcore shell scripters.....anyway to do this? I run WinMX with wine, but my dad likes to play Q3 and if its running it lags really bad. What I would like to do is have script / program that pings an IP every...30 seconds or so, and if it returns true, issues the command killall wine. Possible?
 
Old 12-03-2002, 03:35 AM   #2
Mik
Senior Member
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Ubuntu
Posts: 1,316

Rep: Reputation: 46
You can run the following script from cron every X seconds. Just modify it to run the right command. You might also want to change the timeouts on the ping command.

Code:
#!/bin/sh

/bin/ping -c 2 somehostname &> /dev/null

if [ $? != 0 ]
then
    echo "Run some command"
fi
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ping host unreachable czyang4 Linux - Networking 2 04-20-2005 03:58 PM
Return true or false if I have ping reply Menestrel Programming 4 11-29-2004 01:40 AM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 10:10 AM
Unknown Host <Linuxmachinename> / Unable to ping by host name nishi_k_79 Linux - Networking 4 11-01-2003 02:24 PM
ping works, host works, ping host does not dublin212 Linux - Networking 3 04-01-2003 12:38 AM


All times are GMT -5. The time now is 10:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration