I have similar boxes for different purposes … Tanix Tx3 CE 8.90.3 … one of which serves as the backend server for DVB-T & DVB-S tuners. Essentially running tvheadend and no display attached after initial set up.
I would like to kill as many non-essential process as possible to keep this efficient.
The biggest of course is Kodi itself which I presently kill manually via ssh using
systemctl stop kodi
So my questions
Are there other processes that could be killed at the same time?
How would I best automatically kill such processes after a start or reboot?
I am testing using ‘autostart’ presently.
I have no interest in stripping things out permanently, as my intention is to use the same release on all boxes regardless their use, and adapt the running processes afterwards to suit the function.
You should be able to do “
systemctl disable <service>” so it doesn’t start instead of first starting it and then stopping it with autostart.
You can later on turn it on with enable, if needed.
Where should this command be placed so that Kodi does not get enabled on start up or reboot?
You don’t need to place it anywhere. When you enable a service for instance like this
mecool:~ # systemctl enable lircd
Created symlink /storage/.config/system.d/multi-user.target.wants/lircd.service → /usr/lib/systemd/system/lircd.service.
It creates a symbolic link to the file lircd.service under /storage/.config/system.d/multi-user.target.wants/. Then on boot it starts all the services found under the directory /storage/.config/system.d/multi-user.target.wants/.
When you disable, it removes the symbolic link from /storage/.config/system.d/multi-user.target.wants/, so on next boot it doesn’t get loaded.
mecool:/usr/lib/systemd/system # systemctl disable lircd
Be careful though not to remove any services that are needed for the box to boot up.
I noticed the directory for kodi is a bit different but technically the same principle should apply. However there also seems to be multiple service related to kodi. I’m unsure if they have any dependency with each other.
mecool:~ # systemctl enable kodi
Created symlink /storage/.config/system.d/kodi.target.wants/kodi.service → /usr/lib/systemd/system/kodi.service.
I haven’t tried to reboot without having the kodi service enabled, usually i just restart it or stop it for period of time.
Thanks for that information
It would seem prudent to leave things as they are presently … allowing Kodi to start and then stop it.
At least I know it will reboot