Difference between revisions of "Systemd for voipmonitor service management"

From VoIPmonitor.org
Jump to navigation Jump to search
Line 5: Line 5:
 
Create file /etc/systemd/system/voipmonitor.service
 
Create file /etc/systemd/system/voipmonitor.service
 
  [Unit]
 
  [Unit]
  Description=VOIPmonitor tool for VOIP monitoring
+
  Description=VoIPmonitor sniffer
 
  After=syslog.target
 
  After=syslog.target
 
  After=network.target
 
  After=network.target

Revision as of 14:56, 2 February 2024

This is valid only for system that use systemd as manager for services. (After following this you will be able to use systemctl or service commands also in your OS with systemd)

We don't recommend to use the service command in systemd environment!! The systemd can lose track of the sensor daemon.

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

NOTICE: line 'After=mysql.service' gives a sense only if your mysql is installed locally.