-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into 2323-update-notification-with-new-messaging
- Loading branch information
Showing
2 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
# Generate database.ini | ||
cat <<EOF > pe-reports/src/pe_reports/data/database.ini | ||
[postgres] | ||
host=$(DB_HOST) | ||
database=$(PE_DB_NAME) | ||
user=$(PE_DB_USERNAME) | ||
password=$(PE_DB_PASSWORD) | ||
port=5432 | ||
[shodan] | ||
key1=$(PE_SHODAN_API_KEYS) | ||
[staging] | ||
[cyhy_mongo] | ||
[sixgill] | ||
[whoisxml] | ||
key= | ||
[intelx] | ||
[dnsmonitor] | ||
[pe_db_password_key] | ||
[blocklist] | ||
[dehashed] | ||
[dnstwist] | ||
[hibp] | ||
[API_Client_ID] | ||
[API_Client_secret] | ||
[API_WHOIS] | ||
[pe_api] | ||
EOF | ||
|
||
# Find the path to the pe_reports package in site-packages | ||
pe_reports_path=$(pip show pe-reports | grep -E '^Location:' | awk '{print $2}') | ||
|
||
# Ensure pe_reports_path ends with /pe_reports | ||
pe_reports_path="${pe_reports_path%/pe-reports}/pe_reports" | ||
|
||
|
||
# Copy database.ini to the module's installation directory | ||
cp /app/pe-reports/src/pe_reports/data/database.ini "${pe_reports_path}/data/" | ||
|
||
exec "$@" |