Ubuntu converts an ordinary QT program into a daemon and can boot automatically.

now there is a requirement for the project to transform a QT console program into a daemon, stay in the background for a long time, and be able to start the program on boot

Apr.22,2022

supervisor or docker?


gives you an idea: when
recently docked with an embedded team, they also had self-starting daemons. The operating system of the hardware is the Android system. They brush the firmware, write a .rc script, open the opportunity to automatically pull up the script, and then pull the apk process.
if you can do the same under Linux, start a shell script first (I haven't tried it, but it should be possible to do it), and then shell pulls up the executable program made by QT. So the shell script is the equivalent of a daemon, with an endless loop checking for the existence of the process every few seconds

Menu