Created
January 4, 2016 13:24
-
-
Save ivanrosolen/3c874119dc949e057662 to your computer and use it in GitHub Desktop.
check.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
result=`ps aux | grep -i "/path/file.php args" | grep -v "grep" | wc -l` | |
if [ $result -eq 0 ] | |
then | |
php /path/file.php args >> /path/file.log & | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment