Skip to content

Commit

Permalink
adjust to emba changes in dep check
Browse files Browse the repository at this point in the history
  • Loading branch information
BenediktMKuehne committed Nov 27, 2023
1 parent bca11a3 commit 2c0d25c
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions run-server.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# EMBArk - The firmware security scanning environment
#
# Copyright 2020-2022 Siemens Energy AG
# Copyright 2020-2023 Siemens Energy AG
# Copyright 2020-2022 Siemens AG
#
# EMBArk comes with ABSOLUTELY NO WARRANTY.
Expand Down Expand Up @@ -125,28 +125,16 @@ if ! [[ -d ./emba ]]; then
echo -e "${RED}""${BOLD}""You are using the wrong installation and missing the EMBA subdirectory""${NC}"
fi
if ! (cd "${PWD}"/emba && ./emba -d 1); then
echo -e "${BLUE}""Trying auto-maintain""${NC}"
# automaintain
if ! [[ -d ./emba ]]; then
echo -e "${RED}""EMBA not installed""${NC}"
exit 1
fi
cd ./emba || exit 1
systemctl restart NetworkManager docker
./emba -d 1 1>/dev/null
if [[ $? -eq 1 ]]; then
echo -e "${RED}""EMBA is not configured correctly""${NC}"
exit 1
fi
cd .. || exit 1
echo -e "${RED}""EMBA is not configured correctly""${NC}"
exit 1
fi

# check venv
if ! [[ -d /var/www/.venv ]]; then
echo -e "${RED}""${BOLD}""Pip-enviroment not found!""${NC}"
exit 1
fi
if ! nc -zw1 google.com 443 &>/dev/null ; then
if ! nc -zw1 pypi.org 443 &>/dev/null ; then
(cd /var/www && pipenv check && pipenv verify)
fi

Expand Down

0 comments on commit 2c0d25c

Please sign in to comment.