You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Background: I have a system that has both Docker and Podman configured. Pihole runs as a podman container.
Issue: Installing gravity-sync fails because it thinks pihole is not installed and configured
Root Cause: The logic in the installation script is incorrect. It assumes that if docker is found on the system, then pihole must be a docker container.
Solution: (Not making this a PR, since this is not a full solution and is likely not even the best way to do it)
index 0604c4d..0370b55 100644
--- a/gs-install.sh
+++ b/g.sh
@@ -55,7 +55,7 @@ LOGO="${PURPLE}∞${NC}"
# Variables
CROSSCOUNT="0"
-PHFOUND="0"
+PHFAILCOUNT="0"
CURRENTUSER=$(whoami)
@@ -176,28 +176,28 @@ if [ "$GS_DOCKER" != "1" ]; then
if [ "$FTLCHECK" != "" ]
then
echo -e "${GOOD} Docker container of Pi-hole has been detected"
- PHFOUND=$((PHFOUND+1))
else
echo -e "${WARN} There is no Docker container of Pi-hole running"
+ PHFAILCOUNT=$((PHFAILCOUNT+1))
fi
- fi
- if [ "$PHFOUND" == 0 ] && hash podman 2>/dev/null; then
+ elif hash podman 2>/dev/null; then
echo -e "${GOOD} Podman installation has been detected"
FTLCHECK=$(sudo podman container ls | grep 'pihole/pihole')
if [ "$FTLCHECK" != "" ]
then
echo -e "${GOOD} Podman container of Pi-hole has been detected"
- PHFOUND=$((PHFOUND+1))
else
echo -e "${WARN} There is no Podman container of Pi-hole running"
+ PHFAILCOUNT=$((PHFAILCOUNT+1))
fi
else
echo -e "${FAIL} No local Pi-hole install detected"
+ PHFAILCOUNT=$((PHFAILCOUNT+1))
fi
fi
- if [ "$PHFOUND" == "0" ]
+ if [ "$PHFAILCOUNT" != "0" ]
then
echo -e "${FAIL} Pi-hole was not found on this system"
CROSSCOUNT=$((CROSSCOUNT+1))
This worked for making the installation go through. But I can't get gravity-sync itself to work. This is because it uses a similar logic in that script as well. However, my first attempt at a similar fix did not work. Could someone please look into this and help me resolve it.
The text was updated successfully, but these errors were encountered:
Issue Description
Background: I have a system that has both Docker and Podman configured. Pihole runs as a podman container.
Issue: Installing gravity-sync fails because it thinks pihole is not installed and configured
Root Cause: The logic in the installation script is incorrect. It assumes that if docker is found on the system, then pihole must be a docker container.
Solution: (Not making this a PR, since this is not a full solution and is likely not even the best way to do it)
This worked for making the installation go through. But I can't get gravity-sync itself to work. This is because it uses a similar logic in that script as well. However, my first attempt at a similar fix did not work. Could someone please look into this and help me resolve it.
The text was updated successfully, but these errors were encountered: