Skip to content

Commit 7fb0c79

Browse files
author
Sean Whalen
committed
Add systemd units for suricata-update
1 parent d983c80 commit 7fb0c79

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,4 @@ xmltodict
5050
pyyaml
5151
pyelftools
5252
gunicorn
53+
suricata-update

systemd/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,20 @@ These files help run all the various parts of CAPE as systemd services, so that
5151

5252
```bash
5353
sudo cp /opt/CAPE/systemd/*.service /opt/systemd/system
54+
sudo cp /opt/CAPE/systemd/*.timer /opt/systemd/system
5455
sudo sudo systemctl daemon-reload
56+
sudo systemctl enable suricata-update.service
57+
sudo systemctl enable suricata-update.timer
58+
sudo systemctl enable cuckoo-rooter.service
59+
sudo systemctl enable cuckoo-processor.service
60+
sudo systemctl enable cuckoo.service
61+
sudo systemctl enable cuckoo-wsgi.service
5562
```
5663

5764
10. Start the services for the first time
5865

5966
```bash
67+
sudo service suricata-update start
6068
sudo service cuckoo-rooter start
6169
sudo service cuckoo-processor start
6270
sudo service cuckoo start

systemd/suricata-update.service

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=suricata-update
3+
4+
[Service]
5+
User=root
6+
Group=root
7+
Type=oneshot
8+
ExecStart=/opt/CAPE/venv/bin/suricata-update
9+
10+
[Install]
11+
WantedBy=multi-user.target

systemd/suricata-update.timer

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[Unit]
2+
Description=Run suricata-update hourly and at boot
3+
4+
[Timer]
5+
OnBootSec=15min
6+
OnUnitActiveSec=1h
7+
unit=suricata-update.service
8+
9+
[Install]
10+
WantedBy=timers.target

0 commit comments

Comments
 (0)