Myster-Tee / TinfoilWebServer

Install your packages from your own server
GNU General Public License v3.0
123 stars 26 forks source link

How to run at boot on Linux #31

Open Sevyn13 opened 4 months ago

Sevyn13 commented 4 months ago

How do you run this at boot up in Linux. I have tried writing a script and adding that script to the crontab of the user and the root user. I've tried making a service with systemd. I even tried using Gnome Startup Applications to start it. Nothing has worked. I don't want to have to manually start this at every boot.

Thanks!

Sevyn13 commented 1 month ago

Anyone?

bear-karlsen commented 1 month ago

You should be able to register it as a service under systemd

For reference, mine looks like this:

[Unit] Description=Tinfoil After=network.target

[Service] SyslogIdentifier=tinfoil User=*** Environment=DOTNET_ROOT=/opt/dotnet ExecStart=/usr/local/bin/dotnet /home/user/TinfoilWebServer/TinfoilWebServer/bin/Debug/net8.0/TinfoilWebServer.dll WorkingDirectory=/home/user/TinfoilWebServer/TinfoilWebServer/bin/Debug/net8.0 Restart=always RestartSec=2 Type=simple TimeoutStopSec=5

[Install] WantedBy=multi-user.target