From 46ec29cc5b934bb56e5ddd15a512efcfcec9939f Mon Sep 17 00:00:00 2001 From: Darshit Shah Date: Sun, 14 Jan 2024 02:24:54 +0100 Subject: [PATCH] Allow installing on systems with both docker and podman installed --- gravity-sync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gravity-sync b/gravity-sync index 1c942a69..21945306 100755 --- a/gravity-sync +++ b/gravity-sync @@ -1486,7 +1486,7 @@ function detect_local_pihole { if hash pihole 2>/dev/null; then LOCAL_PIHOLE_TYPE="default" echo_good - elif hash docker 2>/dev/null; then + elif sudo docker container ls | grep ${PIHOLE_CONTAINER_IMAGE} 2>/dev/null; then PH_FTL_CHECK=$(sudo docker container ls | grep ${PIHOLE_CONTAINER_IMAGE}) if [ "$PH_FTL_CHECK" != "" ]; then LOCAL_PIHOLE_TYPE="docker" @@ -1495,7 +1495,7 @@ function detect_local_pihole { LOCAL_PIHOLE_TYPE="none" echo_fail fi - elif hash podman 2>/dev/null; then + elif sudo podman container ls | grep ${PIHOLE_CONTAINER_IMAGE} 2>/dev/null; then PH_FTL_CHECK=$(sudo podman container ls | grep ${PIHOLE_CONTAINER_IMAGE}) if [ "$PH_FTL_CHECK" != "" ]; then LOCAL_PIHOLE_TYPE="podman"