Improve the dependencies of units generated by the Upstart emulation
This commit is contained in:
parent
42ee3b4209
commit
673bf12b1d
@ -57,6 +57,9 @@ let
|
|||||||
''
|
''
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=${job.description}
|
Description=${job.description}
|
||||||
|
${if job.startOn == "stopped udevtrigger" then "After=systemd-udev-settle.service" else
|
||||||
|
if job.startOn == "started udev" then "After=systemd-udev.service"
|
||||||
|
else ""}
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Environment=PATH=${job.path}
|
Environment=PATH=${job.path}
|
||||||
@ -94,10 +97,7 @@ let
|
|||||||
${optionalString (!job.task && job.respawn) "Restart=always"}
|
${optionalString (!job.task && job.respawn) "Restart=always"}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wantedBy =
|
wantedBy = if job.startOn == "" then [ ] else [ "multi-user.target" ];
|
||||||
if job.startOn == "" then [ ]
|
|
||||||
else if job.startOn == "startup" then [ "basic.target" ]
|
|
||||||
else [ "multi-user.target" ];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user