make cortex_init and hive_init time out after 1 minutes vs 5 minutes

This commit is contained in:
m0duspwnens
2021-10-26 08:39:30 -04:00
parent 0c679b62b2
commit fa2edb2b59
2 changed files with 4 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ cortex_init(){
CORTEX_ORG_USER_KEY="{{CORTEXORGUSERKEY}}" CORTEX_ORG_USER_KEY="{{CORTEXORGUSERKEY}}"
SOCTOPUS_CONFIG="$default_salt_dir/salt/soctopus/files/SOCtopus.conf" SOCTOPUS_CONFIG="$default_salt_dir/salt/soctopus/files/SOCtopus.conf"
if wait_for_web_response $CORTEX_URL "Cortex"; then if wait_for_web_response $CORTEX_URL "Cortex" 60; then
# Migrate DB # Migrate DB
curl -sk -XPOST -L "$CORTEX_API_URL/maintenance/migrate" curl -sk -XPOST -L "$CORTEX_API_URL/maintenance/migrate"
@@ -65,7 +65,7 @@ if [ -f /opt/so/state/cortex.txt ]; then
cortex_clean cortex_clean
exit 0 exit 0
else else
if wait_for_web_response http://{{MANAGERIP}}:9400/_cluster/health '"status":"green"'; then if wait_for_web_response http://{{MANAGERIP}}:9400/_cluster/health '"status":"green"' 60; then
cortex_init cortex_init
cortex_clean cortex_clean
else else

View File

@@ -20,7 +20,7 @@ thehive_init(){
SOCTOPUS_CONFIG="/opt/so/saltstack/salt/soctopus/files/SOCtopus.conf" SOCTOPUS_CONFIG="/opt/so/saltstack/salt/soctopus/files/SOCtopus.conf"
echo -n "Waiting for TheHive..." echo -n "Waiting for TheHive..."
if wait_for_web_response $THEHIVE_URL "TheHive"; then if wait_for_web_response $THEHIVE_URL "TheHive" 60; then
# Migrate DB # Migrate DB
curl -sk -XPOST -L "$THEHIVE_API_URL/maintenance/migrate" curl -sk -XPOST -L "$THEHIVE_API_URL/maintenance/migrate"
@@ -43,7 +43,7 @@ if [ -f /opt/so/state/thehive.txt ]; then
thehive_clean thehive_clean
exit 0 exit 0
else else
if wait_for_web_response http://{{MANAGERIP}}:9400/_cluster/health '"status":"green"'; then if wait_for_web_response http://{{MANAGERIP}}:9400/_cluster/health '"status":"green"' 60; then
thehive_init thehive_init
thehive_clean thehive_clean
else else