Skip to content

Commit 80dbb2c

Browse files
committed
Fix Splunk install detection
1 parent 5a5fa5d commit 80dbb2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Scripts/unit5_lab.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ none='\033[0m'
55

66
echo "[UNIT 5 LAB] Starting script..."
77

8-
if systemctl is-active --quiet splunk; then
8+
if sudo /opt/splunk/bin/splunk status | grep 'is running'; then
99
echo -e "${green}[UNIT 5 LAB]${none} Splunk is already installed."
1010
else
1111
echo -e "[UNIT 5 LAB] Installing Splunk..."
@@ -36,7 +36,7 @@ sudo ./splunk enable boot-start
3636
3737
EOF
3838

39-
if systemctl is-active --quiet splunk; then
39+
if sudo /opt/splunk/bin/splunk status | grep 'is running'; then
4040
echo -e "${green}[UNIT 5 LAB]${none} Splunk installed correctly"
4141
else
4242
echo -e "${red}[UNIT 5 LAB]${none} ERROR: Splunk did not install correctly!"

0 commit comments

Comments
 (0)