You are not logged in.
I'd like making a package for the abyss web server X1.
And since it is a server, I'd like making a /etc/rc.d/'s script. Taking as base one of the existing scripts it will be easy.
But I have a problem I'd like starting the server in the background, save its pid somewhere for closing it cleanly (via kill -2) when stopping. How can I do that? I saw pid related manuals, but I got confused.
Also, it would be good (safer at least) starting the server as unprivilegiated user. atm I am using:
su --shell=/bin/sh -c'/usr/bin/abyssws' nobody
but it starts sh with abyssws inside. Can't I fork it to background?
thanks everyone.
P.S. If I manage making a decent package, should I submit it to aur?
Offline
someapplication & #start in background
echo "someapplication's pid = $!"
Offline