Place systemd units in /usr/lib/systemd/system#260
Place systemd units in /usr/lib/systemd/system#260behrmann wants to merge 1 commit intokardianos:masterfrom
Conversation
|
Just noticed, that in the meantime a merge conflict has occurred, so I rebased against current master. |
|
Thanks. Also, this is a fine change, but for some operations, we need to check both the old and new path in sequence to not break existing programs. |
|
Which operations do you have in mind? When writing a new file to I could imagine writing a warning when a service file is generated, that is shadowed by one in |
|
Where exactly should I reference documentation?
I'm not sure I agree. Removing files under Checking for existence of a file under _, err = os.Stat(confPath)
if err == nil {
return fmt.Errorf("Init already exists: %s", confPath)
}in
Ok, I think that would be the case of the PR in its current state |
|
Done.
That doesn't make it a good idea. Example: A binary I use currently uses this module and places its service file in I consider writing to |
Using /usr/lib/systemd/system allows local sysadmins to overwrite to unit file by placing one of the same name in /etc/systemd/system. Fixes: kardianos#259
|
Cross-posting discussion in the GitLab issue queue: As a |
|
For anyone who finds this while the PR is in limbo, workarounds are possible - see use of override configs in https://askubuntu.com/a/659268 |
|
Having just remembered this PR, I want to caution against this workaround. Adding While one can overwrite each and every config item, this becomes tedious and is not safe if new config items were added from systemd's side. Shipping the unit file in |
Using /usr/lib/systemd/system allows local sysadmins to overwrite the unit file by placing one of the same name in /etc/systemd/system.
Fixes: #259