Skip to content

Commit 0725775

Browse files
committed
add choice to only do setup (in case installation already done but setup failed)
1 parent a086738 commit 0725775

File tree

1 file changed

+25
-10
lines changed

1 file changed

+25
-10
lines changed

src/installes.sh

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@
6060
# 20241203 rework test logic at end of setup to improve messages and add crash.log detection and print log if detected
6161
# 20241203 add info on splunk version in output
6262
# 20250115 change sha check to warning if custom build used (because hardcoded sha wont match)
63+
# 20250115 add choice to only do setup (in case installation already done but setup failed)
6364

64-
VERSION="20250115"
65+
VERSION="20250115b"
6566

6667
SCRIPTNAME="installes"
6768

@@ -450,6 +451,17 @@ else
450451
debug_log "user capability check not done as not yet v8+"
451452
fi
452453

454+
PROCEEDSKIPINSTALL="N"
455+
read -p "Do you want to skip installation and only do setup (Y/N) ( default = ${PROCEEDSKIPINSTALL})? " input
456+
PROCEEDSKIPINSTALL=${input:-$PROCEEDSKIPINSTALL}
457+
if [ $PROCEEDSKIPINSTALL == "Y" ] || [ $PROCEEDSKIPINSTALL == "y" ] || [ $PROCEEDSKIPINSTALL == "YES" ] || [ $PROCEEDSKIPINSTALL == "yes" ]; then
458+
echo_log "user want to skip installation"
459+
PROCEEDSKIPINSTALL="Y"
460+
else
461+
debug_log "user want to skip installation"
462+
PROCEEDSKIPINSTALL="N"
463+
fi
464+
453465
if [ $FAIL -gt 0 ]; then
454466
fail_log "There were ${FAIL} fail condition(s) detected, please review messages, fix and rerun script before proceeding to installation step. If you are really sure, you may still try the installation !"
455467
PROCEED="N"
@@ -475,15 +487,18 @@ fi
475487

476488

477489
################################ START INSTALL HERE #########################################
478-
echo_log "INFO: install/updating ES app from ${ESAPPFULL} with splunk install located in ${SPLUNK_HOME} "
479-
480-
# timeout not supported here
481-
# ES install/upgrade
482-
${SPLUNK_HOME}/bin/splunk install app ${ESAPPFULL} -update true
483-
# ${SPLUNK_HOME}/bin/splunk install app ${ESAPPFULL} -update true -auth admin:${PASSWORD}
484-
#App 'xxxxxx/yyyyyy/splunk-enterprise-security_472.spl' installed
485-
#You need to restart the Splunk Server (splunkd) for your changes to take effect.
486-
490+
if [ ${PROCEEDSKIPINSTALL} -eq "N" ]; then
491+
echo_log "INFO: install/updating ES app from ${ESAPPFULL} with splunk install located in ${SPLUNK_HOME}"
492+
493+
# timeout not supported here
494+
# ES install/upgrade
495+
${SPLUNK_HOME}/bin/splunk install app ${ESAPPFULL} -update true
496+
# ${SPLUNK_HOME}/bin/splunk install app ${ESAPPFULL} -update true -auth admin:${PASSWORD}
497+
#App 'xxxxxx/yyyyyy/splunk-enterprise-security_472.spl' installed
498+
#You need to restart the Splunk Server (splunkd) for your changes to take effect.
499+
else
500+
echo_log "installed skipped at user request"
501+
fi
487502

488503
# ES Content update
489504
if [[ "${INSTALLCONTENTUPDATE}" -eq 1 ]]; then

0 commit comments

Comments
 (0)