7 # description: Cassandra database node
9 # processname: cassandra
11 # Source function library
12 . /etc/rc.d/init.d/functions
15 . /etc/sysconfig/network
18 # Get service config - may override defaults
19 # [ -f /etc/sysconfig/cassandra ] && . /etc/sysconfig/cassandra
21 # Check that networking is up.
22 if is_yes "${NETWORKING}"; then
23 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
24 msg_network_down cassandra
31 test -x /usr/sbin/cassandra || exit 0
34 # Check if the service is already running?
35 if [ ! -f /var/lock/subsys/cassandra ]; then
36 msg_starting cassandra
37 daemon /usr/sbin/cassandra -p /var/run/cassandra.pid
39 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/cassandra
41 msg_already_running cassandra
47 if [ -f /var/lock/subsys/cassandra ]; then
49 msg_stopping cassandra
50 killproc --pidfile /var/run/cassandra.pid cassandra -TERM
51 rm -f /var/lock/subsys/cassandra
53 msg_not_running cassandra
58 if [ -f /var/lock/subsys/cassandra ]; then
62 msg_not_running cassandra
68 # See how we were called.
87 # Does not work with /usr/sbin/cassandra for some reason
91 # msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
92 msg_usage "$0 {start|stop|restart|try-restart|force-reload}"