[Lazarus] systemd

A. Fortuny aforsprl at gmail.com
Sat Jun 27 13:47:06 CEST 2015


Hi Folks.

Currently I have some services running in a linux box (OpenSuse 11.2) 
and they will be moved to an OpenSuse 13.2. I want to move the services 
from SysV to systemd.
I noticed that in the service configuration file (namely 
/usr/lin/systemd/system/MyService.service) there are some options wich 
bother me a little bit. The services are programs written using Lazarus 
and its service framework. Please note that the services run either on 
Windows or on Linux (some $ifdef help). I wonder what happens on two points:
1. the new service type parameter TYPE in section [Service] should be 
"simple" I guess
2. the parameter TimeoutStartSec bothers me.

As in the sefvice framework developed using Lazarus units (service 
project), the program is started by the INIT script in /etc/init.d with 
the -r runtime switch. The program then responds to the start event of 
the Daemon unit wich, in turn, starts the main thread and the called 
start procedure exits as soon as posible. The program keeps running 
until the exit signal is fired and the main thread is stopped. If it is 
by the means of the INIT script (service MyService stop) the process is 
killed either soft or hard. The question is: does a service written in 
this new method still needs the Lazarus service framework ? What is the 
signal sent to systemd wich informs it that the sevice has started (read 
man systemd.service (5) )? The same mechanism as the Lazarus service 
framework still applies ?

I'm not yet ready to use either D-BUS messaging system nor socket based 
systemd start service mechanism.

Thank you for any information.

Antonio.


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus






More information about the Lazarus mailing list