Systemd for voipmonitor service management: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This is valid only for system that use systemd as manager for services. | == systemd == | ||
This is valid only for system that use systemd as manager for services. | |||
'''We don't recommend to use the service command in systemd environment!! The systemd can lose track of the sensor daemon.''' | ===beware of use the service command=== | ||
'''We don't recommend to use the service command in systemd environment for manage the sniffer service state!! | |||
The systemd can lose track of the sensor daemon.''' | |||
==systemd's service file for voipmonitor== | |||
Create file /etc/systemd/system/voipmonitor.service | Create file /etc/systemd/system/voipmonitor.service | ||
[Unit] | [Unit] | ||
Line 26: | Line 30: | ||
WantedBy=multi-user.target | WantedBy=multi-user.target | ||
===service file and db host=== | |||
NOTICE: line 'After=mysql.service' gives a sense only if your mysql is installed locally. | NOTICE: line 'After=mysql.service' gives a sense only if your mysql is installed locally. | ||
===service file and napatech drivers=== | |||
Add into service file follwing lines to make sure napatech drivers are initialized before start of the sniffer service. | |||
After=ntservice.service | |||
Requires=ntservice.service | |||
==reload systemd== | |||
Don't forget systemd reload after change. | Don't forget systemd reload after change. | ||
systemctl daemon-reload | systemctl daemon-reload |
Latest revision as of 15:46, 15 January 2025
systemd
This is valid only for system that use systemd as manager for services.
beware of use the service command
We don't recommend to use the service command in systemd environment for manage the sniffer service state!! The systemd can lose track of the sensor daemon.
systemd's service file for voipmonitor
Create file /etc/systemd/system/voipmonitor.service
[Unit] Description=VoIPmonitor sniffer After=syslog.target After=network.target After=mysql.service [Service] Type=forking Restart=no TimeoutSec=5min IgnoreSIGPIPE=no KillMode=process GuessMainPID=no RemainAfterExit=yes SuccessExitStatus=5 6 ExecStart=/etc/init.d/voipmonitor start ExecStop=/etc/init.d/voipmonitor stop #Place temp files in a secure directory, not /tmp? PrivateTmp=false [Install] WantedBy=multi-user.target
service file and db host
NOTICE: line 'After=mysql.service' gives a sense only if your mysql is installed locally.
service file and napatech drivers
Add into service file follwing lines to make sure napatech drivers are initialized before start of the sniffer service.
After=ntservice.service Requires=ntservice.service
reload systemd
Don't forget systemd reload after change.
systemctl daemon-reload