I am using Ubuntu Server to make a Kodi box. I'm using kodi-standalone-service to do so. I have made a shell script (sudo -S <<< "password" systemctl start kodi) to start kodi. When I run it mannually it starts kodi as expected. I need it to run at startup though. The only way I could do so (or at least I thought) was to add @reboot /home/main/startupscript.sh to crontab. And I did so. Now Ubuntu stops after the initial boot log whithout any meaningful error message. And I cant use the terminal. Can you guys help me? Could it be something to do with xorg even though I have it installed? (clearly as I can run it manually) Maybe the command is ran too soon in the boot process?
The proper way to start a service during the boot proccess in a system that uses systemd is by using the
systemctl enable kodi.service