Forum > Unix
DaemonSystemdInstallerUnit
Чебурашка:
Hello,
the unit DaemonSystemdInstallerUnit mentioned in
https://wiki.freepascal.org/Daemons_and_Services
that is supposed to create the systemd control files, is also part of the deamon stuff units or is it a custom unit belonging to the writer of the article?
I did not find in my filesystem.
Thaddy:
That wiki entry is ,well, not very good.
Stick with:
from the official FPC documentation here:
https://www.freepascal.org/docs-html/current/fcl/daemonapp/tdaemoncontroller.html
The example in the fcl-extra directory here:
packages\fcl-extra\examples
and this article by Michael van Canneyt here:
https://www.freepascal.org/~michael/articles/#daemons (also covers Windows services)
and ignore the wiki. (well, it is not that bad and may help you a bit when you first read and understand official sources).
The wiki is an abberation of "components" where there need not be components at all, just classes. You can just as well turn 'Hello, World' into a component < sigh>, but OTOH it may be that Michael also contributed a bit to the wiki to keep at least some control...
(And yes, Michael's articles are an official source)
Чебурашка:
--- Quote from: Thaddy on December 28, 2022, 06:52:11 pm ---That wiki entry is ,well, not very good.
Stick with:
from the official FPC documentation here:
https://www.freepascal.org/docs-html/current/fcl/daemonapp/tdaemoncontroller.html
The example in the fcl-extra directory here:
packages\fcl-extra\examples
and this article by Michael van Canneyt here:
https://www.freepascal.org/~michael/articles/#daemons (also covers Windows services)
and ignore the wiki. (well, it is not that bad and may help you a bit when you first read and understand official sources).
The wiki is an abberation of "components" where there need not be components at all, just classes. You can just as well turn 'Hello, World' into a component < sigh>, but OTOH it may be that Michael also contributed a bit to the wiki to keep at least some control...
(And yes, Michael's articles are an official source)
--- End quote ---
Thanks, in reality I had no problem in writing a deamonized application (and as you say I did it just looking at the sources/pdfs). Only now I also need this deamon to get along with systemd and I was wondering if the cited unit is public or not, so that I don't have to create a custom tool to generate systemd configuration files.
From your answer I understand it is not public.
dbannon:
The content you are looking for (I think) is in an example included with trunk but not yet the release versions of Lazarus.
If you are not using Trunk, the content can be found here - https://gitlab.com/dbannon/laz_examples/-/tree/main/General/TDaemon
Davo
Чебурашка:
--- Quote from: dbannon on December 29, 2022, 10:00:23 am ---The content you are looking for (I think) is in an example included with trunk but not yet the release versions of Lazarus.
If you are not using Trunk, the content can be found here - https://gitlab.com/dbannon/laz_examples/-/tree/main/General/TDaemon
Davo
--- End quote ---
Thank you.
Navigation
[0] Message Index
[#] Next page