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

load python environment in updater #718

Merged
merged 1 commit into from
Jul 24, 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
8 changes: 8 additions & 0 deletions config/emba_updater.init
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ LOG_DIR="/var/log"
[ -x /etc/init.d/redis-server ] || exit 0
[ -d "$LOG_DIR" ] || exit 0

if [ -f EMBA_INSTALL_PATH/external/emba_venv/bin/activate ]; then
source EMBA_INSTALL_PATH/external/emba_venv/bin/activate
fi

if command -v cve_searchsploit > /dev/null ; then
echo "[*] EMBA update - cve_searchsploit update" | tee -a "$LOG_DIR"/emba_update.log
cve_searchsploit -u | tee -a "$LOG_DIR"/emba_update.log
Expand All @@ -28,3 +32,7 @@ EMBA_INSTALL_PATH/external/cve-search/sbin/db_updater.py -v | tee -a "$LOG_DIR"/

echo "[*] EMBA update - update local docker image" | tee -a "$LOG_DIR"/emba_update.log
docker pull embeddedanalyzer/emba | tee -a "$LOG_DIR"/emba_update.log

if [ -f EMBA_INSTALL_PATH/external/emba_venv/bin/activate ]; then
deactivate
fi