Author: vines
Date: Thu Aug 23 20:23:30 2012
New Revision: 1376678
URL: http://svn.apache.org/viewvc?rev=1376678&view=rev
Log:
ACCUMULO-312 - init.d scripts for debian systems with rc.d configuration. The
only reason they're ubuntu only is my use of update-rc.d in the configuration
scripts. I think I'll be updating for that prior to 1.4.2 release, but just in
case I didn't I put them in a debian folder.
Added:
accumulo/branches/1.4/src/assemble/platform/
accumulo/branches/1.4/src/assemble/platform/debian/
accumulo/branches/1.4/src/assemble/platform/debian/gc-only-init.sh (with
props)
accumulo/branches/1.4/src/assemble/platform/debian/init.d/
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-gc
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-master
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-monitor
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-slave
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-tracer
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/master-only-init.sh
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/monitor-only-init.sh
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/slave-only-init.sh
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/stand-alone-init.sh
(with props)
accumulo/branches/1.4/src/assemble/platform/debian/tracer-only-init.sh
(with props)
Added: accumulo/branches/1.4/src/assemble/platform/debian/gc-only-init.sh
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/gc-only-init.sh?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/gc-only-init.sh (added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/gc-only-init.sh Thu Aug
23 20:23:30 2012
@@ -0,0 +1,8 @@
+#! /bin/sh
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+cp init.d/accumulo-gc /etc/init.d
+update-rc.d accumulo-gc defaults
Propchange: accumulo/branches/1.4/src/assemble/platform/debian/gc-only-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-gc
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-gc?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-gc
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-gc Thu
Aug 23 20:23:30 2012
@@ -0,0 +1,136 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: accumulo-gc
+# Required-Start: $network $local_fs
+# Required-Stop: $network $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo garbage collector process
+# Description: The accumulo garbage collector handles cleanup of old
walogs and files in hdfs
+### END INIT INFO
+
+# Author: John Vines <[email protected]>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Garbage Collector"
+NAME=accumulo-gc
+ACCUMULO_PROC=gc
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+DAEMON_ARGS="localhost gc \"garbage collector\""
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ $DAEMON $DAEMON_ARGS > /dev/null || return 1
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-gc
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-master
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-master?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-master
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-master
Thu Aug 23 20:23:30 2012
@@ -0,0 +1,137 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: accumulo-master
+# Required-Start: $network $local_fs hadoop-namenode zookeeper-server
+# Required-Stop: $network $local_fs accumulo-slave
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo master process
+# Description: The accumulo master manages tablet assignment and balance
to accumulo
+### END INIT INFO
+
+# Author: John Vines <[email protected]>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Master"
+NAME=accumulo-master
+ACCUMULO_PROC=master
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+DAEMON_ARGS="localhost master"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ /usr/lib/accumulo/bin/accumulo
org.apache.accumulo.server.master.state.SetGoalState NORMAL
+ $DAEMON $DAEMON_ARGS > /dev/null || return 1
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-master
------------------------------------------------------------------------------
svn:executable = *
Added:
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-monitor
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-monitor?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-monitor
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-monitor
Thu Aug 23 20:23:30 2012
@@ -0,0 +1,136 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: accumulo-monitor
+# Required-Start: $network $local_fs
+# Required-Stop: $network $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo monitor process on 50095
+# Description: The accumulo monitor provides a convenient mechanism for
monitoring accumulo
+### END INIT INFO
+
+# Author: John Vines <[email protected]>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Monitor"
+NAME=accumulo-monitor
+ACCUMULO_PROC=monitor
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+DAEMON_ARGS="localhost monitor"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ $DAEMON $DAEMON_ARGS > /dev/null || return 1
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-monitor
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-slave
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-slave?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-slave
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-slave
Thu Aug 23 20:23:30 2012
@@ -0,0 +1,141 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: accumulo-slave
+# Required-Start: $network $local_fs hadoop-namenode hadoop-datanode
zookeeper-server
+# Required-Stop: $network $local_fs hadoop-datanode hadoop-namenode
zookeeper-server
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo tserver and logger processes
+# Description: The accumulo slaves bundle the tserver and logger
processes for accumulo
+### END INIT INFO
+
+# Author: John Vines <[email protected]>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Slave"
+NAME=accumulo-slave
+ACCUMULO_PROC1=tserver
+ACCUMULO_PROC2=logger
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+DAEMON_ARGS="localhost master"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" -a "`jps -m | grep
$ACCUMULO_PROC2`" ] ; then return 1; fi
+
+ /usr/lib/accumulo/bin/start-server.sh localhost logger
+ /usr/lib/accumulo/bin/start-server.sh localhost tserver "tablet server"
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" -a "`jps -m | grep
$ACCUMULO_PROC2`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC1`" -a ! "`jps -m | grep
$ACCUMULO_PROC2`" ] ; then return 1; fi
+
+ /usr/lib/accumulo/bin/accumulo admin stop localhost
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" ] ; then jps -m | grep
$ACCUMULO_PROC1 | awk '{print $1}' | xargs kill -9; fi
+ if [ "`jps -m | grep $ACCUMULO_PROC2`" ] ; then jps -m | grep
$ACCUMULO_PROC2 | awk '{print $1}' | xargs kill -9; fi
+
+ if [ "`jps -m | grep $ACCUMULO_PROC1`" -a "`jps -m | grep
$ACCUMULO_PROC2`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-slave
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-tracer
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-tracer?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-tracer
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-tracer
Thu Aug 23 20:23:30 2012
@@ -0,0 +1,136 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: accumulo-tracer
+# Required-Start: $network $local_fs zookeeper-server
+# Required-Stop: $network $local_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: accumulo tracer
+# Description: The accumulo tracer provides a mechanism for tracing
accumulo calls
+### END INIT INFO
+
+# Author: John Vines <[email protected]>
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/lib/accumulo/bin
+DESC="Accumulo Tracer"
+NAME=accumulo-tracer
+ACCUMULO_PROC=tracer
+DAEMON=/usr/lib/accumulo/bin/start-server.sh
+DAEMON_ARGS="localhost tracer"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
+# and status_of_proc is working.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ $DAEMON $DAEMON_ARGS > /dev/null || return 1
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 0; fi
+ return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+
+ if [ ! "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 1; fi
+
+ jps -m | grep $ACCUMULO_PROC | awk '{print $1}' | xargs kill -9
+
+ if [ "`jps -m | grep $ACCUMULO_PROC`" ] ; then return 2; fi
+
+ return 0;
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ status)
+ status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/init.d/accumulo-tracer
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/master-only-init.sh
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/master-only-init.sh?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/master-only-init.sh
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/master-only-init.sh Thu
Aug 23 20:23:30 2012
@@ -0,0 +1,8 @@
+#! /bin/sh
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+cp init.d/accumulo-master /etc/init.d
+update-rc.d accumulo-master start 21 2 3 4 5 . stop 19 0 1 6 .
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/master-only-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/monitor-only-init.sh
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/monitor-only-init.sh?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/monitor-only-init.sh
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/monitor-only-init.sh Thu
Aug 23 20:23:30 2012
@@ -0,0 +1,9 @@
+#! /bin/sh
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+cp init.d/accumulo-monitor /etc/init.d
+update-rc.d accumulo-monitor defaults
+
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/monitor-only-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/slave-only-init.sh
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/slave-only-init.sh?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/slave-only-init.sh
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/slave-only-init.sh Thu
Aug 23 20:23:30 2012
@@ -0,0 +1,8 @@
+#! /bin/sh
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+cp init.d/accumulo-slave /etc/init.d
+update-rc.d accumulo-slave start 21 2 3 4 5 . stop 15 0 1 6 .
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/slave-only-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/stand-alone-init.sh
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/stand-alone-init.sh?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/stand-alone-init.sh
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/stand-alone-init.sh Thu
Aug 23 20:23:30 2012
@@ -0,0 +1,11 @@
+#! /bin/sh
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+./gc-only-init.sh
+./monitor-only-init.sh
+./tracer-only-init.sh
+./master-only-init.sh
+./slave-only-init.sh
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/stand-alone-init.sh
------------------------------------------------------------------------------
svn:executable = *
Added: accumulo/branches/1.4/src/assemble/platform/debian/tracer-only-init.sh
URL:
http://svn.apache.org/viewvc/accumulo/branches/1.4/src/assemble/platform/debian/tracer-only-init.sh?rev=1376678&view=auto
==============================================================================
--- accumulo/branches/1.4/src/assemble/platform/debian/tracer-only-init.sh
(added)
+++ accumulo/branches/1.4/src/assemble/platform/debian/tracer-only-init.sh Thu
Aug 23 20:23:30 2012
@@ -0,0 +1,8 @@
+#! /bin/sh
+if [ $(id -ur) -ne 0 ]; then
+ echo "This script must be run as root" 1>&2
+ exit 1
+fi
+
+cp init.d/accumulo-tracer /etc/init.d
+update-rc.d accumulo-tracer defaults
Propchange:
accumulo/branches/1.4/src/assemble/platform/debian/tracer-only-init.sh
------------------------------------------------------------------------------
svn:executable = *