mirror of
https://github.com/docker/docker-bench-security.git
synced 2024-11-01 00:21:45 +01:00
Merge pull request #549 from konstruktoid/issue548
include /run in get_service_file
This commit is contained in:
commit
23110269a6
1 changed files with 5 additions and 1 deletions
|
@ -140,7 +140,11 @@ get_service_file() {
|
|||
echo "/lib/systemd/system/$SERVICE"
|
||||
return
|
||||
fi
|
||||
if systemctl show -p FragmentPath "$SERVICE" 2> /dev/null 1>&2; then
|
||||
if find /run -name "$SERVICE" 2> /dev/null 1>&2; then
|
||||
find /run -name "$SERVICE" | head -n1
|
||||
return
|
||||
fi
|
||||
if [ "$(systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//')" != "" ]; then
|
||||
systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//'
|
||||
return
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue