[systemd-devel] Can a systemd --user instance rely on After= of systemd --system instance?

Peter Hoeg peter at hoeg.com
Sat Mar 4 10:49:49 UTC 2017


Hi,

>If I have a user service which needs to have the system database server
>available: How do I construct a proper depend?

As Lennart was pointing out, the user and system instances do not know
anything about each other, so you cannot.

The 2 other options I can think of:

a) Run a system service specifying your user id in User=

b) Enable socket activation (if possible) on the system instance
database. That way your user instance will simply wait on the socket
until the server comes up.

--
Regards,
Peter


More information about the systemd-devel mailing list