Loop for process checking
Hello,
I'm just playing around with bash to understand it better. I've tried many different lines of code. I'm trying to create a loop to check for process using ps aux. For this example i took sabnzbdplus and sickbeard. I want to detect if one is running, and if not, start the program. Code:
#!/bin/bash Code:
mainstream@dopamine-pc:~/Desktop$ ./process.sh Somehow it's not working. Figure it's got something to do with [ $? -eq 2 ] |
Quote:
Code:
#!/bin/bash -- Should you need it hnd here's some Code:
function help() { echo "Bash scripting guides: |
Quote:
I think this will help me allot in future coding. Code:
#!/bin/bash -- When the app is not running the output is APPLICATIONSTATUS=1 Quote:
|
Quote:
Code:
false; echo "false: $?"; true; echo "true: $?" |
All times are GMT -5. The time now is 07:03 AM. |