cassandra_daemon.sh 211 B

12345678910
  1. #!/bin/bash
  2. while true
  3. do
  4. pid_count=`ps -ef |grep org.apache.cassandra.service.CassandraDaemon |grep -v grep |wc -l`
  5. if [ $pid_count -lt 1 ]
  6. then
  7. cassandra -f >/dev/null 2>&1
  8. fi
  9. sleep 2
  10. done