mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
Return adequate exit code when init fails; Logs output of init scripts for troubleshooting failed installations
This commit is contained in:
@@ -36,6 +36,7 @@ thehive_init(){
|
||||
touch /opt/so/state/thehive.txt
|
||||
else
|
||||
echo "We experienced an issue connecting to TheHive!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -43,10 +44,11 @@ if [ -f /opt/so/state/thehive.txt ]; then
|
||||
thehive_clean
|
||||
exit 0
|
||||
else
|
||||
if wait_for_web_response http://{{MANAGERIP}}:9400 '"status":"green"'; then
|
||||
if wait_for_web_response http://{{MANAGERIP}}:9400/_cluster/health '"status":"green"'; then
|
||||
thehive_init
|
||||
thehive_clean
|
||||
else
|
||||
echo "TheHive Elasticsearch server is not ready; unable to proceed with hive init."
|
||||
echo "TheHive Elasticsearch server is not ready; unable to proceed with TheHive init."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user