need help creating a non-root systemd service |

Trending 2 months ago

I'm utilizing ubuntu 22 and presently person a personification and group named "steam"

When I want to tally my cs2 server , I first move to steam personification :

su steam

Then I tally nan pursuing bid :

cs2-server @public1 start

The supra bid doesn't tally arsenic guidelines personification and throws an correction saying it's a information consequence to tally it arsenic guidelines truthful I person to create a systemd work that tin beryllium accessed by steam personification .

The way to cs2-server is /usr/local/bin/cs2-server .

When I tally nan commencement bid from steam personification , I don't get punctual for a password arsenic good which I deliberation nan work I create must not inquire for a password either .

This is really I created a systemd work but had nary luck :

[Unit] Description=public 1 run [Service] User=steam Group=steam ExecStart=/usr/local/bin/cs2-server @public1 start Restart=on-failure RestartSec=5 [Install]

How should I execute what I want?