From 0c4e2e348ca32e61d16a9989d666d37ad65bb506 Mon Sep 17 00:00:00 2001 From: AkshayDubey29 Date: Fri, 13 Jul 2018 12:41:54 +0530 Subject: [PATCH] Update entrypoint.sh --- universalforwarder/entrypoint.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/universalforwarder/entrypoint.sh b/universalforwarder/entrypoint.sh index a99a8f0..67230d6 100644 --- a/universalforwarder/entrypoint.sh +++ b/universalforwarder/entrypoint.sh @@ -87,9 +87,21 @@ EOF __restart_required=true fi + #if [[ "$__restart_required" == "true" ]]; then + # sudo -HEu ${SPLUNK_USER} sh -c "${SPLUNK_HOME}/bin/splunk restart" + #fi + + #For Using set command with splubnkforwarder to set values like datastore-dir, deploy-poll, default-index, minfreemb, servername, server-type, splunkd-port, web-port, kvstore-port + #http://docs.splunk.com/Documentation/Splunk/7.0.3/Admin/CLIadmincommands + if [[ -n ${SPLUNK_SET} ]]; then + sudo -HEu ${SPLUNK_USER} sh -c "${SPLUNK_HOME}/bin/splunk set ${SPLUNK_SET} -auth admin:changeme" + __restart_required=true + fi + if [[ "$__restart_required" == "true" ]]; then sudo -HEu ${SPLUNK_USER} sh -c "${SPLUNK_HOME}/bin/splunk restart" fi + # Setup forwarding server # http://docs.splunk.com/Documentation/Splunk/latest/Forwarding/Deployanixdfmanually