Advertisement
kobe6661

openstackDataCollector restart

May 28th, 2015
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. PATH=/usr/sbin:/usr/bin:/sbin:/bin
  4. VAR=$(ps aux | grep python | grep openstackDataCollector | grep -v bash | grep -v grep | awk '{print $2}')
  5. #echo "$VAR"
  6.  
  7. if [[ "$VAR" == '' ]]; then
  8. echo "OpenstackDataCollector failed. Restarting..."
  9. /usr/bin/python /opt/fiware/openstackDataCollector.py
  10. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement