davmac314 / dinit

Service monitoring / "init" system
Apache License 2.0
582 stars 45 forks source link

Porting suricata to dinit #342

Closed Yakui420 closed 3 months ago

Yakui420 commented 3 months ago

Hello, I'm kinda new to dinit and I was wondering how to port suricata.service (systemd) to dinit?

# Sample Suricata systemd unit file.
[Unit]
Description=Suricata Intrusion Detection Service
After=syslog.target network-online.target

[Service]
# Environment file to pick up $OPTIONS. On Fedora/EL this would be
# /etc/sysconfig/suricata, or on Debian/Ubuntu, /etc/default/suricata.
#EnvironmentFile=-/etc/sysconfig/suricata
#EnvironmentFile=-/etc/default/suricata
ExecStartPre=/bin/rm -f @e_rundir@suricata.pid
ExecStart=/sbin/suricata -c @e_sysconfdir@suricata.yaml --pidfile @e_rundir@suricata.pid $OPTIONS
ExecReload=/bin/kill -USR2 $MAINPID

[Install]
WantedBy=multi-user.target

It would be nice if you could explain some of the steps, as I've already read through the documentation, but I'm still pretty unsure how to set it up in the future.