Skip to content

Instantly share code, notes, and snippets.

@6d61726b760a
Created September 8, 2020 02:00
Show Gist options
  • Save 6d61726b760a/3db92f29a5572a39fc0932ede4ab9e86 to your computer and use it in GitHub Desktop.
Save 6d61726b760a/3db92f29a5572a39fc0932ede4ab9e86 to your computer and use it in GitHub Desktop.
# /etc/profile.d/splunk.sh
if [ -d /opt/splunk ]; then
export SPLUNK_HOME="/opt/splunk"
export PATH=${PATH}:${SPLUNK_HOME}/bin
elif [ -d /opt/splunkforwarder ]; then
export SPLUNK_HOME="/opt/splunkforwarder"
export PATH=${PATH}:${SPLUNK_HOME}/bin
fi
# Skip all for noninteractive shells.
[ ! -t 0 ] && return
source ${SPLUNK_HOME}/bin/setSplunkEnv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment