if [[ $(command -v docker) ]]; then echo "docker is installed.." else echo "Let's get docker" curl -fsSL https://get.docker.com -o get-docker.sh bash get-docker.sh fi if [ -L /etc/systemd/system/multi-user.target.wants/docker.service ] then echo "Docker Enabled" else echo "Docker Not Enable" systemctl enable docker systemctl daemon-reload fi docker_status=`systemctl status docker | grep "Active" | awk -F "[: ]+" '{print $3}'` if [ "$docker_status" == "inactive" ]; then systemctl start docker fi