Skip to content

Commit

Permalink
Update: Adding ability to install docker
Browse files Browse the repository at this point in the history
1 - Adding ability to check docker is installed on system or not and if not then install it automatic
2 - Update read me file
  • Loading branch information
llaravell committed Mar 10, 2024
1 parent 7454801 commit 24f0adf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions mahimana.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,25 @@ getSSL() {
fi
}

# Install Docker
installDocker() {
# Check if docker is installed or not
if command -v docker &> /dev/null; then
printf "${Green} ✅ Docker is already installed ${NC} \n";
printf "${Green} 💁 Your Docker information is: ${NC} \n";
sudo docker info;
else
printf "${Blue} 🚀 Starting Install Docker ... ${NC} \n";
sudo bash -c "$(curl -sSL https://get.docker.com)" > /dev/null 2>&1 & spinner;
printf "${Green} 🎉 Install Docker is complete ${NC} \n";
printf "${Green} 💁 Your Docker information is: ${NC} \n";
sudo docker info;
fi
# wait 5 secound
sleep 5;
main;
}

# Main
main() {
clear
Expand All @@ -403,6 +422,7 @@ main() {
printf "${Cyan}3. Bind a domain ${Blue}(bind9) ${Red}[Server]${NC}\n"
printf "${Cyan}4. Remove a domain ${Blue}(bind9) ${Red}[Server]${NC}\n"
printf "${Cyan}5. Get single SSL certificate for a domain ${Red}[Server]${NC}\n"
printf "${Cyan}6. Install Docker${NC}\n"

read -p "Enter your choice: " choice

Expand All @@ -422,6 +442,9 @@ main() {
5)
getSSL
;;
6)
installDocker
;;
*)
printf "${Red}Invalid choice. Exiting.${NC}\n"
exit 1
Expand Down
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Here're some of the project's best features:
* Adding domain with <span style="color:red">bind9</span>
* Removing domain with <span style="color:red">bind9</span>
* Get single SSL for a domain with <span style="color:red">Certbot</span>
* Install Docker

<h2>🛠️ Usage</h2>

Expand Down

0 comments on commit 24f0adf

Please sign in to comment.