mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-19 00:32:34 +01:00
add get_docker_configuration_file_args
Signed-off-by: Thomas Sjögren <konstruktoid@users.noreply.github.com>
This commit is contained in:
parent
7c20138161
commit
7410cdf9f6
1 changed files with 10 additions and 1 deletions
|
@ -77,7 +77,16 @@ get_docker_cumulative_command_line_args() {
|
|||
# Does not account for option default or implicit options.
|
||||
get_docker_effective_command_line_args() {
|
||||
OPTION="$1"
|
||||
get_docker_cumulative_command_line_args $OPTION | tail -n1
|
||||
get_docker_cumulative_command_line_args "$OPTION" | tail -n1
|
||||
}
|
||||
|
||||
get_docker_configuration_file_args() {
|
||||
OPTION="$1"
|
||||
FILE="$(get_docker_effective_command_line_args '--config-file' | \
|
||||
sed 's/.*=//g')"
|
||||
if ! grep "$OPTION" "$FILE"; then
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
get_systemd_service_file(){
|
||||
|
|
Loading…
Reference in a new issue