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

add pre condition at the exec start and test #1

Open
con-cis opened this issue Aug 3, 2023 · 0 comments
Open

add pre condition at the exec start and test #1

con-cis opened this issue Aug 3, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@con-cis
Copy link
Owner

con-cis commented Aug 3, 2023

[Unit]
Description=Suricata Alert Notifier
After=network.target

[Service]
Type=simple
ExecStartPre=/usr/bin/bash -c 'if [ "$(find /var/log/suricata/eve.json -mmin -1)" ]; then exit 0; else exit 1; fi'
ExecStart=/path/to/suricata-notify
Restart=always
RestartSec=60
# Add Environment if required
# Environment=DISPLAY=:0  # Example for X11-based systems

[Install]
WantedBy=multi-user.target
@con-cis con-cis added the enhancement New feature or request label Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant