Start a file automatically (Linux OpenSUSE 15.2)?

El
- in Servers
2

How do I ensure that a file is executed when Linux starts.
The file is a .sh file that starts my Minecraft server.
Important, the file should be executed in the directory / home / Minecraft / Server when it starts.

He

Question: Why necessarily this directory? This is not a user's home directory (then it shouldn't have a capital letter in front). In addition, this could cause problems with the autostart if / home is not yet mounted. Unfortunately, I don't know from my head how to get around that.

Otherwise you should have a special user for the server who is not allowed to log in. And then I would implement it as a systemd unit file, but there are also other options.

Bl

Preferably via a systemd unit: https://wiki.ubuntuusers.de/systemd/Units/

Alternatively via cron: https://wiki.ubuntuusers.de/Cron/