Systemd unit file: Can/Should ExecStart and ExecStop run a script?

Richard Shaw hobbes1069 at
Wed Oct 19 21:48:46 UTC 2011

On Wed, Oct 19, 2011 at 4:43 PM, Kay Sievers <kay.sievers at> wrote:
> On Wed, Oct 19, 2011 at 23:35, Richard Shaw <hobbes1069 at> wrote:
>> That works for me. I wonder if I could use ExecStartPre to run a shell
>> script to make sure the user is in those groups and write to stderr if
>> not?
> That's a job for a %pre RPM script, not a service. Create the user and
> put the user in the group when the package is installed.


>> Also, the shell expansion doesn't work on ExecStart, so how to I set
>> the user in the command line?
> Hardcode it. It does not make much sense to configure something, or
> use config file indirections for stuff that does not need to be
> changed anyway.

That will work for the user, however, I was also going to allow for
additional options from the sysconfig file, but $OPTIONS wasn't being
expand either.


More information about the devel mailing list