-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better support for portable user service files (rootless). #19690
Comments
This is not true anymore. ExecStart nowadays consults |
Please elaborate or correct me if I'm wrong but I get the following error This is after setting The documentation reads:
"determined at compilation time" unfortunately doesn't help in this situation. |
Added another solution suggestion of adding |
You're right, the paths are hard-coded during compilation time. For the user instance, there is the I do think that adding |
It cannot use %h? What makes you think so? |
Ended up writing some fresh service files today and to my happy surprise Thank you for your patience. Will go ahead and close this. For the future I do think it would be helpful to add |
Is your feature request related to a problem? Please describe.
I'm writing
*.service
files in~/.config/systemd/user/
for user level systemd (systemctl --user
) service management.The problem is
ExecStart
must be an absolute path and cannot use%h
. This forces me to have service files that are not portable between users.ExecStart=
is pointing to binaries in/home/USER/.local/bin
This path is important as users run more rootless daemons, rootless containers (ex: rootless docker) for security and isolation.
Describe the solution you'd like
%h/.local/bin
to the$PATH
when running as--user
?%h
inExecStart=
. Example:ExecStart=%h/.local/bin/cockroach
?ExecStart=
when running assystemctl --user
?The systemd version you checked that didn't have the feature you are asking for
Any assistance, suggestions welcome. Thank you!
The text was updated successfully, but these errors were encountered: