From d855d03eb9712f98112fa8c22b55cb4688aaa948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20L=C3=BCscher?= Date: Tue, 30 Apr 2024 08:49:32 +0000 Subject: [PATCH] feat(main): check if podman is installed --- forge.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/forge.sh b/forge.sh index e7eddb9..5913ead 100755 --- a/forge.sh +++ b/forge.sh @@ -113,6 +113,18 @@ function check_prerequisites { echo -e "${GREEN}podman is installed${ENDCOLOR}" echo "" fi + echo -e "${YELLOW}Checking podman socket service${ENDCOLOR}" + PODMAN_SERVICE_STATUS="$(systemctl --user is-active podman.socket)" + if [ "${PODMAN_SERVICE_STATUS}" != "active" ]; + then + echo -e "${RED}It looks like your podman socket is not running.${ENDCOLOR}" + echo -e "${RED}Make sure to configure and start it first.${ENDCOLOR}" + echo -e "${YELLOW}Need help? -> https://github.com/containers/podman/blob/main/docs/tutorials/socket_activation.md${ENDCOLOR}" + exit 1 + else + echo -e "${GREEN}podman socket is ${PODMAN_SERVICE_STATUS}${ENDCOLOR}" + echo "" + fi echo -e "${YELLOW}Checking jq installation${ENDCOLOR}" JQ_PATH=$(which jq 2>/dev/null || echo 'FALSE') if [ "$JQ_PATH" == "FALSE" ];