Created
May 17, 2012 16:47
-
-
Save nowthatsamatt/2720114 to your computer and use it in GitHub Desktop.
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 | |
| PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ruby/bin" | |
| import_script_news=`ps -ef|grep -c [i]mport_script_news.rb` | |
| if [ $import_script_news -lt 1 ]; then | |
| echo "CRITICAL: import_script_news.rb is NOT running." | |
| cd /srv/news/current && RAILS_ENV=production nohup bundle exec rails runner extras/import_script_news.rb >> /srv/service_logs/import_script_news.log & | |
| exit 2 | |
| fi | |
| echo "OK: All import scripts are running." | |
| exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment