Skip to content

Commit

Permalink
Create default location for database, index and attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Mar 18, 2021
1 parent 68b45a5 commit 433e480
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions conf/application.sample.conf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ db.janusgraph {
storage {
## Cassandra configuration
# More information at https://docs.janusgraph.org/basics/configuration-reference/#storagecql
backend: cql
// backend: cql
// hostname: ["ip1", "ip2"]
# Cassandra authentication (if configured)
// username: "thehive"
Expand All @@ -23,9 +23,9 @@ db.janusgraph {
}

## For test only !
# Comment Cassandra settings before enable Berkeley database
// storage.backend: berkeleyje
// storage.directory: /path/to/berkeleydb
# Comment the two lines below before enable Cassandra database
storage.backend: berkeleyje
storage.directory: /opt/thp/thehive/database
// berkeleyje.freeDisk: 200 # disk usage threshold
}

Expand Down
4 changes: 2 additions & 2 deletions package/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ case "$1" in
fi

# Chown definitions created by SBT Native Packager
mkdir -p /var/log/thehive
mkdir -p /var/log/thehive /opt/thp/thehive/index /opt/thp/thehive/database /opt/thp/thehive/files
touch /var/log/thehive/application.log
chown -R thehive:thehive /var/log/thehive
chown -R thehive:thehive /var/log/thehive /opt/thp/thehive/index /opt/thp/thehive/database /opt/thp/thehive/files
chown root:thehive /etc/thehive/application.conf /etc/thehive/logback.xml /etc/thehive/secret.conf
chmod 0640 /etc/thehive/application.conf /etc/thehive/logback.xml /etc/thehive/secret.conf
test -x /bin/systemctl && /bin/systemctl daemon-reload || /bin/true
Expand Down
5 changes: 3 additions & 2 deletions package/rpm/post
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ if test -x /bin/systemctl; then
/bin/systemctl daemon-reload || /bin/true
fi

mkdir -p /var/log/thehive
mkdir -p /var/log/thehive /opt/thp/thehive/index /opt/thp/thehive/database /opt/thp/thehive/files
touch /var/log/thehive/application.log
chown -R thehive:thehive /var/log/thehive
chown -R thehive:thehive /var/log/thehive /opt/thp/thehive/index /opt/thp/thehive/database /opt/thp/thehive/files

0 comments on commit 433e480

Please sign in to comment.