want to write a systemd service file where a user may not exist.

Tom H tomh0665 at gmail.com
Sun Feb 12 11:58:51 UTC 2017


On Sat, Feb 11, 2017 at 6:48 AM, Ralf Mardorf <silver.bullet at zoho.com> wrote:
> On Fri, 10 Feb 2017 09:04:14 -0500, Peter Silva wrote:
>>
>> I don't want to create the daemon user on systems where it will only
>> be used as a client, so in many cases the 'user' specified in the
>> service file will not exist. How to cleanly handle that?
>
> the Ubuntu policy is to auto-start everything that could be
> auto-started, so you most likely need to chose another path to install
> the unit.
>
> Instead of
>
> /lib/systemd/system/foo.service
>
> install it to e.g.
>
> /usr/share/doc/foo/examples/foo.service

Or drop a "daemon_name.preset" into "/lib/systemd/system-preset/" with
"disable daemon_name.service", which should disable it by default.



More information about the ubuntu-users mailing list