mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +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"
|
touch "$oldServiceFiles"
|
||||||
else
|
else
|
||||||
find "$oldUserServicePath" \
|
find "$oldUserServicePath" \
|
||||||
-maxdepth 1 -name '*.service' -exec basename '{}' ';' \
|
-maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
|
||||||
| sort \
|
| sort \
|
||||||
> "$oldServiceFiles"
|
> "$oldServiceFiles"
|
||||||
fi
|
fi
|
||||||
|
@ -43,7 +43,7 @@ function systemdPostReload() {
|
||||||
touch "$newServiceFiles"
|
touch "$newServiceFiles"
|
||||||
else
|
else
|
||||||
find "$newUserServicePath" \
|
find "$newUserServicePath" \
|
||||||
-maxdepth 1 -name '*.service' -exec basename '{}' ';' \
|
-maxdepth 1 -name '*.service' \! -name '*@.service' -exec basename '{}' ';' \
|
||||||
| sort \
|
| sort \
|
||||||
> "$newServiceFiles"
|
> "$newServiceFiles"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue