[systemd-devel] Service should run with a certain User?
baldur at email.de
Sat Apr 23 01:03:37 PDT 2011
after doing the simple examples of .service scripts, i was able to run
some of my
home-brewn services with fedora 15 beta.
However now i tried something advanced (?) and i have to admit defeat.
simply no idea how to proceed.
I used to run with upstart a script with an "ugly" solution to do
something like that
su cruisctl -c "servicescript.sh"
This was not pretty, however the script did run under the wanted user.
Now i tried the same thing with systemd. It worked if tried the ugly
I found that systemd has thee User= option, so i tried to avoid the su
and start the
script with systemed. But the service doesn't start
when i set the "User=" option, it always returns a 203 error.
Can somebody tell me what i am doing wrong?
Here is my test setup
The test.sh looks like this
echo "Start" >/tmp/x
echo Directory: $(pwd) >>/tmp/x
echo Ant Home: $ANT_HOME >>/tmp/x
echo $1 $2 $3 $4 $5 $6 >>/tmp/x
Error is like that
cruisctl.service - Cruise Control
Loaded: loaded (/lib/systemd/system/cruisctl.service)
Process: 4313 ExecStart=/root/test.sh $CRUISCTLOPTIONS
More information about the systemd-devel