mirror of
https://github.com/nix-community/home-manager
synced 2024-11-24 21:53:18 +00:00
systemd: don't try to restart templates
If the user has template services in their systemd configuration, these can't be restarted, and will produces warnings during the activation phase. Avoid those warnings by skipping any uninstantiated templates when looking for services to start or stop.
This commit is contained in:
parent
7a88ff6ad1
commit
607f969f5d
1 changed files with 2 additions and 2 deletions
|
@ -34,7 +34,7 @@ function systemdPostReload() {
|
|||
touch "$oldServiceFiles"
|
||||
else
|
||||
find "$oldUserServicePath" \
|
||||
-maxdepth 1 -name '*.service' -exec basename '{}' ';' \
|
||||
-maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
|
||||
| sort \
|
||||
> "$oldServiceFiles"
|
||||
fi
|
||||
|
@ -43,7 +43,7 @@ function systemdPostReload() {
|
|||
touch "$newServiceFiles"
|
||||
else
|
||||
find "$newUserServicePath" \
|
||||
-maxdepth 1 -name '*.service' -exec basename '{}' ';' \
|
||||
-maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
|
||||
| sort \
|
||||
> "$newServiceFiles"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue