I'm using a Raspberry Pi 2 Model B running the latest Raspbian Stretch Lite 2018-11-13.
I built a program that communicates with a LoRa chip (SX1276) using SPI, gets some data from a temperature sensor and prints the temperature on the screen.
My program consists of only one executable (apart from wiringpi library).
I was searching for a tutorial to make my program a *.deb package. Using this tutorial I managed to build a lora.deb
package.
When I installed my lora.deb
package sudo dpkg -i lora.deb
the executable just deployed in a directory.
How can I make that package automatically run the executable and also run it every time the system boots?
systemd
service files. If your deb package contains a service file, and you add a postinstall script to your package, you can bring up a service after install automatically and on boot. – 111--- Jan 12 '19 at 20:48