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

Peter Silva peter at bsqt.homeip.net
Fri Feb 10 14:04:14 UTC 2017

Hi folks, wondering if people could direct me to a good place to ask this
question.  It isn't really a user question, but ... anyways.   I work on a
package that can run either under a dedicated user, as a sort of daemon or
server mode, or it can be used by ordinary users directly in client mode
(connecting to daemons elsewhere.)

When I install the package, on older releases, there is /etc/default and I
put a file there to ensure it is disabled by default.   That's fine.

in systemd, I use the documented stuff in dh_ and it puts the service file
in the right place.

Two issues:
    -- when I do systemctl status sarra ... it says: 'vendor preset:
enabled')  I want it to be disabled by default.  Couldn't find that.

    -- 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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20170210/bb338a1a/attachment.html>

More information about the ubuntu-users mailing list