28 lines
1.1 KiB
Desktop File
28 lines
1.1 KiB
Desktop File
[Unit]
|
|
Description=Mistborn Scirius Service
|
|
Requires=Mistborn-base.service
|
|
After=Mistborn-base.service
|
|
PartOf=Mistborn-base.service
|
|
|
|
[Service]
|
|
Restart=always
|
|
RestartSec=15
|
|
User=root
|
|
Group=docker
|
|
PermissionsStartOnly=true
|
|
# Shutdown container (if running) when unit is stopped
|
|
ExecStartPre=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh,scirius docker-compose -f /opt/mistborn/extra/scirius.yml down
|
|
|
|
# Start container when unit is started
|
|
ExecStart=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh,scirius docker-compose -f /opt/mistborn/extra/scirius.yml up --build
|
|
# Suricata
|
|
ExecStartPost=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh,scirius /opt/mistborn/scripts/services/scirius/suricata_start.sh
|
|
|
|
# Stop container when unit is stopped
|
|
ExecStop=/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh,scirius docker-compose -f /opt/mistborn/extra/scirius.yml down
|
|
# Post stop
|
|
ExecStopPost=-/opt/mistborn/scripts/wrappers/mistborn_docker.sh wazuh,scirius /opt/mistborn/scripts/services/scirius/suricata_stop.sh
|
|
|
|
[Install]
|
|
WantedBy=Mistborn-base.service
|