Skip to content

Commit

Permalink
systemd: don't try to restart templates
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
me-and authored Jun 26, 2024
1 parent 7a88ff6 commit 607f969
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/systemd-activate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 607f969

Please sign in to comment.