You are not logged in.
Pages: 1
Topic closed
Hello,
I'm trying to define a Wants dependency between some of my user units and a system unit.
Specifically, i have a unit that runs my getmail script and i want it to run when
network-online.target has been activated.
Thus i have,
WantedBy=network-online.target
in it.
I installed it with
systemctl --user enable getmail.service
However, when i activate network-online.target, my getmail unit is not activated.
When i installed the unit as above, it creates the network-online.target.wants directory
where my user units are.
Anyways, this all says to me that network-online.target does not know about my unit.
How do i do this then if i want access to the 'system level' network-online.target?
Do i have to place it in /etc/systemd/system instead?
Then what the heck is the point of having these user sessions in the first place!
Thank you.
Last edited by captaincurrie (2014-08-19 13:44:53)
Offline
The answer is yes.
When running in user mode, the load path, by default, does not include system unit paths.
You can add units not in the load path with,
systemctl link <unit_name>
Offline
Will this work if my user service has a Wants= dependency on a system target?
I am trying to use
Wants=network-online.target
After=network-online.target
but it doesn't seem to work for me.
Offline
Offline
Pages: 1
Topic closed