Code
This commit is contained in:
30
controller/leaf-controller.service
Normal file
30
controller/leaf-controller.service
Normal file
@@ -0,0 +1,30 @@
|
||||
[Unit]
|
||||
Description=LEAF alert controller and VyOS reconciliation worker
|
||||
# ordering contract: the controller binds the alert socket BEFORE the
|
||||
# sensor unit starts (suricata is the unix_stream CLIENT); do not reorder.
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
RequiresMountsFor=/var/log/suricata-leaf
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
NotifyAccess=main
|
||||
TimeoutStartSec=30
|
||||
EnvironmentFile=/etc/leaf-controller/env
|
||||
Environment=PYTHONDONTWRITEBYTECODE=1
|
||||
ExecStart=/usr/bin/python3 -m leaf_controller.main --config /etc/leaf-controller/config.yaml
|
||||
WorkingDirectory=/opt/leaf-controller/controller
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
TimeoutStopSec=180
|
||||
User=leafctrl
|
||||
Group=leafctrl
|
||||
UMask=0027
|
||||
NoNewPrivileges=yes
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
ReadWritePaths=/var/lib/leaf-controller /var/log/leaf-controller /run/suricata
|
||||
PrivateTmp=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user