Skip to content

Commit

Permalink
Merge pull request #837 from m-1-k-3/echo_if20
Browse files Browse the repository at this point in the history
Try cve db update multiple times during installation
  • Loading branch information
m-1-k-3 committed Oct 18, 2023
2 parents ed6508c + 741e259 commit 6b344c2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions installer/IF20_cve_search.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,19 @@ IF20_cve_search() {
# also do not update if we are running as github action (GH_ACTION set to 1)
if [[ "$GH_ACTION" -eq 0 ]] && [[ "$CVE_INST" -eq 1 ]]; then
/etc/init.d/redis-server restart
./sbin/db_mgmt_cpe_dictionary.py -p || true
./sbin/db_mgmt_json.py -p || true
./sbin/db_updater.py -f || true
CNT=0
while [[ "${CVE_INST}" -eq 1 ]]; do
./sbin/db_mgmt_cpe_dictionary.py -p || true
./sbin/db_mgmt_json.py -p || true
./sbin/db_updater.py -f || true
if [[ $(./bin/search.py -p busybox 2>/dev/null | grep -c ":\ CVE-") -gt 18 ]]; then
break
fi
if [[ "${CNT}" -gt 4 ]]; then
break
fi
CNT=$((CNT+1))
done
else
echo -e "\\n""$GREEN""$BOLD""CVE database is up and running. No installation process performed!""$NC"
fi
Expand Down

0 comments on commit 6b344c2

Please sign in to comment.