Browse Source

feat: warn if docker is not running

pull/8291/head
Rohit T P 5 months ago
parent
commit
6d2155ef95
  1. 18
      docker-compose/setup-script/noco.sh

18
docker-compose/setup-script/noco.sh

@ -543,9 +543,25 @@ $(declare -f read_number)
$(declare -f read_number_range)
check_if_docker_is_running() {
yellow="\033[1;33m"
nocolor="\033[0m"
blue="\033[1;34m"
if ! $DOCKER_COMMAND ps >/dev/null 2>&1; then
echo "+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+"
echo -e "| \${yellow}Warning ! \${nocolor} |"
echo "| Docker is not running. Most of the commands will not work without Docker. |"
echo "| Use the following command to start Docker: |"
echo -e "| \${blue} sudo systemctl start docker \${nocolor} |"
echo "+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+"
fi
}
# Function to display the menu
show_menu() {
# clear
clear
check_if_docker_is_running
echo ""
echo \$MSG
echo "Service Management Menu:"

Loading…
Cancel
Save