I will get my RB today, so I'm curious: I took a look how to autostart a program on a RaspBerry an found an article how to start it as a Service with this script.
Q: Is it a "real" Service like in B4A (-> Need Special coding) or is it just a non-ui program called "service" then? (so no special coding is needed)
B4X:
sudo nano /etc/init.d/skeleton
B4X:
#!/bin/sh
### BEGIN INIT INFO
# Provides: MyProgram
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description:
# Description:
### END INIT INFO
# Actions
case "$1" in
start)
# START
;;
stop)
# STOP
;;
restart)
# RESTART
;;
esac
exit 0
I need my program to be started at boot and to be closed when the RB shuts down. What is the correct way? Starting it as a "service" seems to handle that.