Bash Scripting Question
Hey,
I want to write a simple script that checks to see if aMule is running, and if it is not running - activate the program. My main directions are using grep somehow, though simply typing "ps ax | grep amule" always gives some answer (even if amule is not running). I'd appreciate any help. Tnx, fiod |
What answer does it give you if it's not running?
|
Code:
[ `pidof -s amule` == "" ] && amule When making Code:
ps ax | grep pattern Code:
ps ax | grep amule | grep -v grep |
Thank You
|
would you mind posting your resulting script? I'd like to have a look at it and see if I can adapt it in some way to check the kppp demon is running. It's crashing on me every 1 or 2 days and it would be nice to be able to keep a tab on it, close all kppp related threads , restart and reconnect automatically (as opposed to finding out kppp crashed 5 minutes after I went to bed while trying to do a 'yum update')
|
All times are GMT -5. The time now is 11:55 PM. |