Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major EMBA change #172

Merged
merged 1 commit into from
Nov 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading