From d3cf8181305f94229e255a27f590fafe03e36ec4 Mon Sep 17 00:00:00 2001 From: Michael Thompson <25192401+nh-mike@users.noreply.github.com> Date: Mon, 15 Feb 2021 17:47:55 +0800 Subject: [PATCH] Fix crash when using remote docker instance When trying to compare / sync and where the remote host is based on Docker, an error will be displayed as per below: invalid argument "pihole1" for "-f, --filter" flag: bad format of filter (expected name=value) See 'docker ps --help'. --- includes/gs-core.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/gs-core.sh b/includes/gs-core.sh index 4e591075..64f98c26 100644 --- a/includes/gs-core.sh +++ b/includes/gs-core.sh @@ -102,7 +102,7 @@ function ph_type { RH_EXEC="${RIHOLE_BIN}" elif [ "$RH_IN_TYPE" == "docker" ] then - RH_EXEC="sudo ${ROCKER_BIN} exec $(sudo ${ROCKER_BIN} ps -qf ${ROCKER_CON}) pihole" + RH_EXEC="sudo ${ROCKER_BIN} exec $(sudo ${ROCKER_BIN} ps -qf name=${ROCKER_CON}) pihole" elif [ "$RH_IN_TYPE" == "podman" ] then RH_EXEC="sudo ${RODMAN_BIN} exec ${ROCKER_CON} pihole" @@ -143,4 +143,4 @@ function start_gs_noconfig { MESSAGE="Evaluating Arguments" echo_stat -} \ No newline at end of file +}