Is there an easy way to convert sysV to systemd scripts? Or add dependencies to a sysV script?
I just installed Snort on a Fedora 24 system. The official RPMs from snort.org are made for Fedora 21 (don't know how relevant that is but mentioning it just in case). It includes a sysV init script: /etc/init.d/snortd.
Just set up the configuration and used systemctl to enable the service at boot, everything fine except that... snort starts too early. The network has not been initialized yet, so it complains that the interface is down and exits. Code:
Oct 19 12:35:06 localhost snort[405]: FATAL ERROR: Can't start DAQ (-1) - enp2s0: That device is not up! So I tried creating a directory '/etc/systemd/system/snortd.wants' and putting there a symlink to NetworkManager.service. I was hoping this would make snort start after NetworkManager does, but it didn't solve the problem. I guess sysV init scripts cannot have dependencies the way a systemd service would. Any suggestions? Thanks. |
Fedora 16 Chapter 7. Services and Daemons
if [ check to see if needed services is running yet ] ; then run that code .. place within the file that is needing to be started after the other service is started. loop it. ???? or if the system is calling for this one to be started first, maybe do this Code:
if [ ! network ] ; then SysVinit to Systemd Cheatsheet Fedora search pattern used: sysV starting services in order |
You need to create a service file for it that defines the startup dependency. Simple search found two almost identical examples - Fedora and Ubuntu.
|
All times are GMT -5. The time now is 03:32 PM. |