I want to create a program for RPi, which will mimic an existing program I wrote for Windows back around 2004.
That program was a service application created using Delphi7 (object pascal language).
But I want to create a clone of it for RPi4 Linux, and the most problematic part is the interface to the operating system, which was provided by the application class I used at the time without knowing how it was accomplished...
What are the requirements for a program, which can be run as a service in Raspbian Buster (systemd)?
AFAICT this is what is needed:
- Command line program, i.e. no GUI part whatsoever
- Shall run "forever" once started
1) How does systemd shut the service program down?
By killing it outright, or is there some communication mechanism that I need to implement
2) Is there some system interface I need to implement?
3) Can any kind of command line program be used as a Linux service as long as it does not use a user interface?