Skip to content

Commit

Permalink
Add support for services with a delegate cgroup subhierarchy
Browse files Browse the repository at this point in the history
Fixes #61
  • Loading branch information
Antiz96 committed Jul 15, 2024
1 parent c53a022 commit f9018d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion admin/checkservices
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,10 @@ get_broken_maps() {
for service in $(get_services); do
unit_path="$(systemctl --property ControlGroup --value show "$service")"
# hack to fix to systemd internal cgroup escaping on slice
unit_path="$(printf "$unit_path"|sed 's,\\x5c,\\,')"
unit_path="$(printf '%s' "$unit_path"|sed 's,\\x5c,\\,')"
# has Delegate Subgroup?
delegate_path="$(systemctl --property DelegateSubgroup --value show "$service")"
[[ -n ${delegate_path} ]] && unit_path="${unit_path}/${delegate_path}"
# get the right pidfile name
pidfile=''
for path in "$SYSTEMD_CGROUP_BASE_PATH$unit_path/cgroup.procs" \
Expand Down

0 comments on commit f9018d0

Please sign in to comment.