[systemd-devel] systemd - how to run system service by user target
Kamil Jońca
kjonca at o2.pl
Thu Oct 20 03:23:36 UTC 2016
Lennart Poettering <lennart at poettering.net> writes:
> On Wed, 19.10.16 12:46, Kamil Jońca (kjonca at o2.pl) wrote:
>
>>
>> Assume we have openvpn.service.
>> This service neccessary only when I want to connect to my work from
>> home.
>>
>> Is it possible to make user target which will be automatically run this
>> service?
>
> Whenever a user logs in it will get a per-user slice unit
> started. When the user logs out, the slice unit is removed. You could
Unfortunately we cannot say about user login/logout - I have my laptop
and it is only hibernated or sleeping.
I thought rather about:
--8<---------------cut here---------------start------------->8---
systemctl --user start work-at-home.target
--8<---------------cut here---------------end--------------->8---
which runs vpn, mounts network discs etc.
Is it possible?
KJ
--
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Landru! Guide us!
-- A Beta 3-oid, "The Return of the Archons", stardate 3157.4
More information about the systemd-devel
mailing list