Skip to content

Instantly share code, notes, and snippets.

@gose
Last active December 12, 2015 01:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gose/4694414 to your computer and use it in GitHub Desktop.
Save gose/4694414 to your computer and use it in GitHub Desktop.
Endeca CAS Startup Script: /etc/rc.d/init.d/endeca-cas
#!/bin/sh
#
# Oracle Endeca CAS
#
# chkconfig: 345 92 21
# description: Oracle Endeca CAS
#
################################################################################
#
# This is an example init.d service script for running Endeca automatically
# on Linux systems that support 'chkconfig'. The following steps will help you
# install Endeca as an automatic service.
#
# NOTE: Your Linux system must support 'chkconfig' for the following procedure.
#
# Review the chkconfig header at the top of this file to make sure it has
# the appropriate runlevels, start priority, and end priority that you
# want Endeca to start under. Consult the documention for your Linux
# system to understand these settings.
#
# At a command prompt, run chkconfig to add the MDEX service. For example:
#
# $ /sbin/chkconfig --add endeca-cas
#
################################################################################
ENDECA_USER=endeca
CAS_ROOT=/usr/local/endeca/CAS/3.1.1
CAS_WORKSPACE=/usr/local/endeca/CAS/workspace
usage() {
echo "Usage: ${0} (start|stop)"
}
case "${1}" in
start)
/bin/su - "${ENDECA_USER}" -c "${CAS_ROOT}/bin/cas-service.sh >> ${CAS_WORKSPACE}/logs/cas-service-wrapper.log 2>&1 &"
;;
stop)
/bin/su - "${ENDECA_USER}" -c "${CAS_ROOT}/bin/cas-service-shutdown.sh"
;;
*)
usage
exit 2
esac
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment