-
Notifications
You must be signed in to change notification settings - Fork 1
/
deploy.sh
executable file
·35 lines (26 loc) · 1.14 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Install system requirements
apt install inotify-tools -y
# Install pip requirements
pip3 install boto3 pytz
docker-compose exec timesketch-worker bash -c "pip3 install timesketch-import-client"
# Copy files
cp python/watch-s3-to-timesketch.py /opt/watch-s3-to-timesketch.py
cp bash/watch-to-timesketch.sh /opt/watch-to-timesketch.sh
cp bash/watch-plaso-to-s3.sh /opt/watch-plaso-to-s3.sh
# Fix permissions
chmod +x /opt/watch-plaso-to-s3.sh
chmod +x /opt/watch-to-timesketch.sh
# Make sure Plaso dirs exist
mkdir -p /opt/timesketch/upload/plaso
mkdir -p /opt/timesketch/upload/plaso_complete
# Configure services
cp systemd/data-to-timesketch.service /etc/systemd/system/data-to-timesketch.service
systemctl enable data-to-timesketch.service
systemctl start data-to-timesketch.service
cp systemd/watch-plaso-to-s3.service /etc/systemd/system/watch-plaso-to-s3.service
systemctl enable watch-plaso-to-s3.service
systemctl start watch-plaso-to-s3.service
cp systemd/watch-s3-to-timesketch.service /etc/systemd/system/watch-s3-to-timesketch.service
systemctl enable watch-s3-to-timesketch.service
systemctl start watch-s3-to-timesketch.service