[systemd-devel] user startable services in systemd context

microcai microcai at fedoraproject.org
Thu Apr 7 07:18:38 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

? 2011?04?07? 20:55, Marius Tolzmann ??:
> 
> Hi again..
> 
> we have a setup where every user can start its own services
> (e.g. a webserver, database server, whatever).
> 
> if the user wants this service to be started after a reboot he just
> tells us the name of its startup files and we add those to our startup
> system. The service is then started with user privileges.
> 
> the user is able to stop and start the service any time..
> 
> is there a way this kind of setup can be configured in systemd?
> 
> thats what we would like to do:
> - start services unprivileged (this already works with systemd)
> - let the user start, stop, restart his service

use systemd --user

> 
> currently the user is able to stop his service (e.g. just kill it) but
> then systemd complains about a "stopped" service. if the user starts his
> service again he starts it in his user session/cgroup which gets moved
> to the users master session/cgroup after a logout. this is not very nice.
> 
> so i like to clean this mess up a bit but havn't found much information
> how this could already be done or if it is even planned to be a possible
> configuration in the future.
> 
> bye marius
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iQEcBAEBAgAGBQJNnce8AAoJEKT4Uz7oTANZ8VIIAIrp/ZszRX1/6+M+f1P7fa4J
K0UvEwoh37tduu1TXo1q8T2aOV7eTg6HuVwoMPe3HjBOJAyl+lOKf62luAR2PXLS
d8xTPiCvr5HW2JZnR9B8iaF5PscHuWtUB+Uk4oAUJ2wTMZOIw0HJ6/OgL2XAYot/
PRmrdIw4n8ogBJRbF4R3083ozb96JOpcdJ1St+iSK4xCaN0EYjwgT/xNrP5zIabj
SVjz2W1MFOika8NvA4AMIN+Wz8jV095HcQhvjxJzQ1Flg+Htp++sYjUXFZ+7cN1Y
KS3niy5t7w5hXhHkI+MgAB0xzTfiDUmL+BkB9CXJ56yRlQDaqDjbpoZO4XzUZro=
=H+/7
-----END PGP SIGNATURE-----


More information about the systemd-devel mailing list