Compare commits

...

3 Commits

Author SHA1 Message Date
Prashant Shahi
abea45f255 Merge branch 'main' into fix/install-no-sudo 2025-01-30 18:47:43 +05:45
Prashant Shahi
c0d8f8de3a Merge branch 'main' into fix/install-no-sudo 2025-01-27 11:35:23 +05:45
Prashant Shahi
860fa4a995 fix(install-script): handle no sudo command scenerio
Signed-off-by: Prashant Shahi <prashant@signoz.io>
2025-01-27 01:59:35 +05:30

View File

@@ -309,7 +309,7 @@ request_sudo() {
echo -e "Got it! Thanks!! 🙏\n"
echo -e "Okay! We will bring up the SigNoz cluster from here 🚀\n"
fi
fi
fi
}
echo ""
@@ -317,7 +317,7 @@ echo -e "👋 Thank you for trying out SigNoz! "
echo ""
sudo_cmd=""
docker_compose_cmd=""
docker_compose_cmd="docker compose"
# Check sudo permissions
if (( $EUID != 0 )); then
@@ -325,7 +325,13 @@ if (( $EUID != 0 )); then
echo " In case of any failure or prompt, please consider running the script with sudo privileges."
echo ""
else
sudo_cmd="sudo"
if hash sudo 2>/dev/null; then
sudo_cmd="sudo"
else
echo "🟡 Running installer with root permissions but sudo command not found, running without sudo"
echo " In case of any failure or prompt, please consider installing sudo and running the script again."
echo ""
fi
fi
# Checking OS and assigning package manager
@@ -466,11 +472,10 @@ if ! is_command_present docker; then
fi
if has_docker_compose_plugin; then
echo "docker compose plugin is present, using it"
docker_compose_cmd="docker compose"
# Install docker-compose
echo "docker compose plugin found, using it"
else
docker_compose_cmd="docker-compose"
echo "docker compose plugin not found, using docker-compose instead"
if ! is_command_present docker-compose; then
request_sudo
install_docker_compose