diff --git a/scripts/healthcheck.sh b/scripts/healthcheck.sh index af2c635..6161d54 100755 --- a/scripts/healthcheck.sh +++ b/scripts/healthcheck.sh @@ -1,4 +1,5 @@ #!/bin/bash +SKIPGSAD=${SKIPGSAD:-false} FUNC=$(cat /usr/local/etc/running-as) ContainerShutdown() { # Flush logs; @@ -39,8 +40,10 @@ case $FUNC in nmap -p 9390 localhost| grep -qs "9390.*open" || exit 1 ;; gsad) - #gsad should be listening on 9392 - curl -f http://localhost:9392/ || curl -kf https://localhost:9392/ || exit 1 + if [ "$SKIPGSAD" == "false" ]; then + #gsad should be listening on 9392 + curl -f http://localhost:9392/ || curl -kf https://localhost:9392/ || exit 1 + fi ;; redis) redis-cli -s /run/redis/redis.sock ping || exit 1 @@ -80,8 +83,10 @@ case $FUNC in SERVICE="$SERVICE openvas\n" fi # gsad - curl -f http://localhost:9392/ || curl -kf https://localhost:9392/ || FAIL=3 + if [ "$SKIPGSAD" == "false" ]; then + curl -f http://localhost:9392/ || curl -kf https://localhost:9392/ || FAIL=3 if [ $FAIL -eq 3 ]; then SERVICE="$SERVICE gsad\n"; fi + fi # redis redis-cli -s /run/redis/redis.sock ping || FAIL=4 if [ $FAIL -eq 4 ]; then SERVICE="$SERVICE redis\n"; fi diff --git a/scripts/single.sh b/scripts/single.sh index a6d3602..b91b54f 100755 --- a/scripts/single.sh +++ b/scripts/single.sh @@ -31,7 +31,7 @@ if [ $GVMD_ARGS == "blank" ]; then GVMD_ARGS='--' fi if [ "$DEBUG" == "true" ]; then - for var in USERNAME PASSWORD RELAYHOST SMTPPORT REDISDBS QUIET CREATE_EMPTY_DATABASE SKIPSYNC RESTORE DEBUG HTTPS GSATIMEOUT ; do + for var in USERNAME PASSWORD RELAYHOST SMTPPORT REDISDBS QUIET CREATE_EMPTY_DATABASE SKIPSYNC RESTORE DEBUG HTTPS GSATIMEOUT SKIPGSAD; do echo "$var = ${var}" done fi @@ -44,8 +44,6 @@ function DBCheck { echo 0 fi } -# Need something new here to check for existing 'old' /data and fix all the links. -# maybe an option passed to fs-setup? # 21.4.4-01 and up uses a slightly different structure on /data, so we look for the old, and correct if we find it. if [ -f /data/var-log/gvmd.log ]; then @@ -473,7 +471,8 @@ echo "Starting Open Scanner Protocol daemon for OpenVAS..." # But if we leave the socket owned by root, gvmd can not communicate with it. chgrp gvm /var/run/ospd/ospd.sock chgrp gvm /var/run/ospd/ospd-openvas.sock -if [ SKIPGSAD="false"]; then + +if [ SKIPGSAD == "false" ]; then echo "Starting Greenbone Security Assistant..." #su -c "gsad --verbose --http-only --no-redirect --port=9392" gvm if [ $HTTPS == "true" ]; then