mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 01:19:32 +08: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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user