Skip to content

Commit

Permalink
Merge pull request #30 from CommunityHoneyNetwork/consistent_sysconfig
Browse files Browse the repository at this point in the history
Include a default value for MONGODB_INDEXTTL
  • Loading branch information
amerck authored Nov 6, 2019
2 parents 4f36be4 + f7151a0 commit 99e1863
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mnemosyne.run.j2
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ then
sed -i "s/mongo_host *=.*/mongo_host = ${MONGODB_HOST}/" {{ mnemosyne_dir }}/mnemosyne.cfg
sed -i "s/mongo_port *=.*/mongo_port = ${MONGODB_PORT}/" {{ mnemosyne_dir }}/mnemosyne.cfg
if [[ ! -z "${MONGODB_INDEXTTL}" ]]; then
sed -i "s/mongo_indexttl *=.*/mongo_indexttl = ${MONGODB_INDEXTTL}/" {{ mnemosyne_dir }}/mnemosyne.cfg
sed -i "s/mongo_indexttl *=.*/mongo_indexttl = ${MONGODB_INDEXTTL:-2592000}/" {{ mnemosyne_dir }}/mnemosyne.cfg
fi
sed -i "s/ignore_rfc1918 *=.*/ignore_rfc1918 = ${IGNORE_RFC1918}/" {{ mnemosyne_dir }}/mnemosyne.cfg

Expand Down
4 changes: 4 additions & 0 deletions mnemosyne.sysconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ HPFEEDS_PORT=10000
MONGODB_HOST='mongodb'
MONGODB_PORT=27017

# MONGODB_INDEXTTL sets the number of seconds to keep data in the mongo database
# This default value is 30 days
MONGODB_INDEXTTL=2592000

IGNORE_RFC1918=False

0 comments on commit 99e1863

Please sign in to comment.