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. (After following this you will be able to use systemctl or service commands also in your OS with systemd) | 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 | Create file /etc/systemd/system/voipmonitor.service | ||
Line 9: | Line 11: | ||
[Service] | [Service] | ||
Type=forking | Type=forking | ||
Restart=no | |||
TimeoutSec=5min | |||
IgnoreSIGPIPE=no | |||
KillMode=process | |||
GuessMainPID=no | |||
RemainAfterExit=yes | |||
SuccessExitStatus=5 6 | |||
ExecStart=/etc/init.d/voipmonitor start | ExecStart=/etc/init.d/voipmonitor start | ||
ExecStop=/etc/init.d/voipmonitor stop | ExecStop=/etc/init.d/voipmonitor stop | ||
#Place temp files in a secure directory, not /tmp? | #Place temp files in a secure directory, not /tmp? | ||
PrivateTmp=false | PrivateTmp=false |
Revision as of 11:13, 17 January 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 tool for VOIP monitoring 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.