Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for Ubuntu 22.04. Debian 11 #5

Open
not-batmanor opened this issue Nov 4, 2023 · 0 comments
Open

Update for Ubuntu 22.04. Debian 11 #5

not-batmanor opened this issue Nov 4, 2023 · 0 comments

Comments

@not-batmanor
Copy link

not-batmanor commented Nov 4, 2023

git clone https://github.com/ReconInfoSec/graylog2thehive.git /opt/graylog2thehive

Add a run_as user/group ie: myusername

root@thehive:/opt/graylog2thehive# adduser myusername
root@thehive:/opt/graylog2thehive# chown myusername:myusername /opt/graylog2thehive/ -R

Update the .service file with the local username/group, and change to python3

cat init.d/graylog2thehive.service
[Unit]
Description=graylog2thehive
After=multi-user.target

[Service]
Type=idle
Environment="HIVE_SECRET_KEY=blahblahblah"
User=myusername
Group=myusername

WorkingDirectory=/opt/graylog2thehive
ExecStart=/usr/bin/python3 app.py runserver

StandardOutput=journal

StandardError=journal

[Install]
WantedBy=multi-user.target
root@thehive:/opt/graylog2thehive#
root@thehive:/opt/graylog2thehive#cp init.d/graylog2thehive.service /etc/systemd/system/graylog2thehive.service

Change the requirements file to look like this, and run the pip update (if needed, apt install python3-pip):

thehive4py==1.6.0
requests
#json
#logging
flask

root@thehive:/opt/graylog2thehive# pip install -r requirements.txt

Then tell linux the world has changed, and start your service.

root@thehive:/opt/graylog2thehive# systemctl daemon-reload
root@thehive:/opt/graylog2thehive# systemctl enable graylog2thehive.service
root@thehive:/opt/graylog2thehive# systemctl start graylog2thehive.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant