mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-09-23 00:57:14 +00:00
fix(sh): check default ubuntu locations of docker.service and docker.socket files
Signed-off-by: Ilya Dus <ilyadoos@gmail.com>
This commit is contained in:
parent
0307da4c61
commit
d42fedc370
3 changed files with 9 additions and 7 deletions
|
@ -103,11 +103,13 @@ get_docker_configuration_file_args() {
|
|||
grep "$OPTION" "$CONFIG_FILE" | sed 's/.*://g' | tr -d '" ',
|
||||
}
|
||||
|
||||
get_systemd_service_file() {
|
||||
get_service_file() {
|
||||
SERVICE="$1"
|
||||
|
||||
if [ -f "/etc/systemd/system/$SERVICE" ]; then
|
||||
echo "/etc/systemd/system/$SERVICE"
|
||||
elif [ -f "/lib/systemd/system/$SERVICE" ]; then
|
||||
echo "/lib/systemd/system/$SERVICE"
|
||||
elif systemctl show -p FragmentPath "$SERVICE" 2> /dev/null 1>&2; then
|
||||
systemctl show -p FragmentPath "$SERVICE" | sed 's/.*=//'
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue