Commit 1d2ce0e4 authored by Seblu's avatar Seblu
Browse files

checkservice: Fix unable to find pid file

When unit_path is sent to sed to workaround some chars in path,
the escaped characters was decoded by printf and characters
like \x2d were substitued by -, leading to an invalid path.

Error was:
```
$ checkservice
Error:: Unable to find pid file for openvpn-client@vpn.seblu.net.service.
```
parent 454e9245
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ 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="${unit_path/\\x5c/\\}"
        # get the right pidfile name
        pidfile=''
        for path in "$SYSTEMD_CGROUP_BASE_PATH$unit_path/cgroup.procs" \