Re: Can not start a script with systemd

2022-03-13 Thread Greg Wooledge
On Mon, Mar 14, 2022 at 12:24:24AM +0200, Alexis Grigoriou wrote: > I got it working, but not how I would rather like it. But I will post > my solution just in case anyone benefits from it. It seems that the > User= directive does not load the user's environment, so I ommited that > directive. As

Re: Can not start a script with systemd

2022-03-13 Thread Alexis Grigoriou
On Sun, 2022-03-13 at 16:46 -0400, Greg Wooledge wrote: > If it requires environment variables like HOME to be defined, then > you > might need to add those.  Either in the unit file, or in the wrapper > script. > > Looks like the systemd version uses an "Environment=" directive, from > systemd.ex

Re: Can not start a script with systemd

2022-03-13 Thread Greg Wooledge
On Sun, Mar 13, 2022 at 10:05:11PM +0200, Alexis Grigoriou wrote: > I still get an error and alienarena-ded does not load. What's the error? > I forgot to > mention that the server doesn't run in the background but when loaded > it stays in it's console. That's good. That's what you want. > I

Re: Can not start a script with systemd

2022-03-13 Thread Alexis Grigoriou
On Sun, 2022-03-13 at 10:17 -0400, Greg Wooledge wrote: > Or, if you want to get rid of the wrapper script entirely: > > = > [Unit] > Description=Alien Arena Dedicated Server > > [Service] > Type=exec > User=aaserver > WorkingDirectory=/

Re: Can not start a script with systemd

2022-03-13 Thread Greg Wooledge
On Sun, Mar 13, 2022 at 01:44:23PM +0200, Alexis Grigoriou wrote: > The script to start alienarena-ded: > >#! /bin/sh >killall alienarena-ded >sleep 5 >cd /home/aaserver/aa >./alienarena-ded +set game arena +exec ctfir.cfg >exit 0 There are two or three problems with this

Can not start a script with systemd

2022-03-13 Thread Alexis Grigoriou
Hello list, I'm running a game server on a VPS (Alien Arena). I have a script to load it and it works fine when I invoke it. However when trying to load it from systemd it always fails. Also this is my first attemp to load something from systemd. Fresh install debian stable fully updated. The s