7 # description: Cassandra database node
10 # Source function library
11 . /etc/rc.d/init.d/functions
14 . /etc/sysconfig/network
17 # Get service config - may override defaults
18 # [ -f /etc/sysconfig/cassandra ] && . /etc/sysconfig/cassandra
20 # Check that networking is up.
21 if is_yes "${NETWORKING}"; then
22 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
23 msg_network_down cassandra
30 test -x /usr/sbin/cassandra || exit 0
33 # Check if the service is already running?
34 if [ ! -f /var/lock/subsys/cassandra ]; then
35 msg_starting cassandra
36 daemon /usr/sbin/cassandra -p /var/run/cassandra.pid
38 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cassandra
40 msg_already_running cassandra
46 if [ -f /var/lock/subsys/cassandra ]; then
48 msg_stopping cassandra
49 killproc --pidfile /var/run/cassandra.pid cassandra -TERM
50 rm -f /var/lock/subsys/cassandra
52 msg_not_running cassandra
57 if [ -f /var/lock/subsys/cassandra ]; then
61 msg_not_running cassandra
67 # See how we were called.
86 # Does not work with /usr/sbin/cassandra for some reason
90 # msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
91 msg_usage "$0 {start|stop|restart|try-restart|force-reload}"