mirror of
https://github.com/gophish/gophish
synced 2024-11-12 23:37:11 +00:00
Add DB_NAME to run.sh to support mysql (#2850)
Adding environment variable DB_NAME to run.sh so that Gophish Container can be set up with mysql/mariadb. db_name has to be changed in config to mysql for mysql connection to work.
This commit is contained in:
parent
04f0fb6dfd
commit
ac9e6a7190
1 changed files with 8 additions and 0 deletions
|
@ -66,6 +66,14 @@ if [ -n "${CONTACT_ADDRESS+set}" ] ; then
|
|||
cat config.json.tmp > config.json
|
||||
fi
|
||||
|
||||
# db_name has to be changed to mysql for mysql connection to work
|
||||
if [ -n "${DB_NAME+set}" ] ; then
|
||||
jq -r \
|
||||
--arg DB_NAME "${DB_NAME}" \
|
||||
'.db_name = $DB_NAME' config.json > config.json.tmp && \
|
||||
cat config.json.tmp > config.json
|
||||
fi
|
||||
|
||||
if [ -n "${DB_FILE_PATH+set}" ] ; then
|
||||
jq -r \
|
||||
--arg DB_FILE_PATH "${DB_FILE_PATH}" \
|
||||
|
|
Loading…
Reference in a new issue