cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1043292 - in /cassandra/trunk/redhat: cassandra cassandra.in.sh
Date Wed, 08 Dec 2010 03:49:56 GMT
Author: brandonwilliams
Date: Wed Dec  8 03:49:56 2010
New Revision: 1043292

URL: http://svn.apache.org/viewvc?rev=1043292&view=rev
Log:
Forgotten files from CASSANDRA-1823

Added:
    cassandra/trunk/redhat/cassandra
    cassandra/trunk/redhat/cassandra.in.sh

Added: cassandra/trunk/redhat/cassandra
URL: http://svn.apache.org/viewvc/cassandra/trunk/redhat/cassandra?rev=1043292&view=auto
==============================================================================
--- cassandra/trunk/redhat/cassandra (added)
+++ cassandra/trunk/redhat/cassandra Wed Dec  8 03:49:56 2010
@@ -0,0 +1,48 @@
+#!/bin/bash
+#
+# /etc/init.d/cassandra
+#
+# Startup script for Cassandra
+# 
+# chkconfig: 2345 20 80
+# description: Starts and stops Cassandra
+
+. /etc/rc.d/init.d/functions
+
+export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/
+export CASSANDRA_HOME=/usr/share/cassandra/
+export CASSANDRA_INCLUDE=/usr/share/cassandra/cassandra.in.sh
+export CASSANDRA_CONF=/etc/cassandra/conf
+export CASSANDRA_OWNR=cassandra
+log_file=/var/log/cassandra/cassandra.log
+pid_file=/var/run/cassandra/cassandra.pid
+CASSANDRA_PROG=/usr/sbin/cassandra
+
+
+case "$1" in
+    start)
+        # Cassandra startup
+        echo -n "Starting Cassandra: "
+        su $CASSANDRA_OWNR -c "$CASSANDRA_PROG -p $pid_file" > $log_file 2>&1
+        echo "OK"
+        ;;
+    stop)
+        # Cassandra shutdown
+        echo -n "Shutdown Cassandra: "
+        su $CASSANDRA_OWNR -c "kill `cat $pid_file`"
+        echo "OK"
+        ;;
+    reload|restart)
+        $0 stop
+        $0 start
+        ;;
+    status)
+        status -p $pid_file cassandra
+        ;;
+    *)
+        echo "Usage: `basename $0` start|stop|status|restart|reload"
+        exit 1
+esac
+
+exit 0
+

Added: cassandra/trunk/redhat/cassandra.in.sh
URL: http://svn.apache.org/viewvc/cassandra/trunk/redhat/cassandra.in.sh?rev=1043292&view=auto
==============================================================================
--- cassandra/trunk/redhat/cassandra.in.sh (added)
+++ cassandra/trunk/redhat/cassandra.in.sh Wed Dec  8 03:49:56 2010
@@ -0,0 +1,10 @@
+
+# The directory where Cassandra's configs live (required)
+CASSANDRA_CONF=/etc/cassandra/conf
+
+# The java classpath (required)
+CLASSPATH=$CLASSPATH:$CASSANDRA_CONF
+
+for jar in /usr/share/cassandra/lib/*.jar; do
+    CLASSPATH=$CLASSPATH:$jar
+done



Mime
View raw message