Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installing on systems with both docker and podman installed #430

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions gravity-sync
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down