Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions dockerbot/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,41 +27,39 @@ class bcolors:

Choose carefully!
""")

def getarch():
try:
architecture = int(input("> "))
while True:
try:
architecture = int(input("> "))

if architecture == 1:
return architecture
elif architecture == 2:
return architecture
elif architecture == 3:
print("You can search on google how to get it :)")
elif architecture == 4:
print("Ask the developer for help :)")
else:
if architecture in (1, 2):
return architecture
elif architecture == 3:
print("You can search on google how to get it :)")
elif architecture == 4:
print("Ask the developer for help :)")
else:
print("Enter a correct value!")
except ValueError:
print("Enter a correct value!")
except:
print("Enter a correct value!")
getarch()

def install():
if getarch() == 1:
architecture = getarch()
if architecture == 1:
print(f"{bcolors.WARNING}Installing requirements{bcolors.ENDC}")
os.system("apt install screenfetch git wondershaper docker.io -y")
print(f"{bcolors.WARNING}70% Done{bcolors.ENDC}")
os.system("git clone https://github.com/dxomg/vpsbot")
os.system("cd vpsbot/dockerbot")
os.system("wget -O imagesamd64.tar.gz 'https://drive.google.com/uc?id=1iUUNLS4hhSk6vCXMwjR09jCOFAblK7as&export=download&confirm=t&uuid=6aa2ceab-5731-4e33-ab08-f054aedafe3e' && docker load < imagesamd64.tar")
os.system("wget -O imagesamd64.tar.gz 'https://drive.google.com/uc?id=1iUUNLS4hhSk6vCXMwjR09jCOFAblK7as&export=download&confirm=t&uuid=6aa2ceab-5731-4e33-ab08-f054aedafe3e' && docker load < imagesamd64.tar.gz")
print(f"{bcolors.WARNING}100% Done{bcolors.ENDC}")
if getarch() == 2:
if architecture == 2:
print(f"{bcolors.WARNING}Installing requirements{bcolors.ENDC}")
os.system("apt install screenfetch git wondershaper docker.io -y")
print(f"{bcolors.WARNING}70% Done{bcolors.ENDC}")
os.system("git clone https://github.com/dxomg/vpsbot")
os.system("cd vpsbot/dockerbot")
os.system("wget -O imagesamd64.tar.gz 'https://drive.google.com/uc?id=1lGrbGAnDBbGpUH63X_zq2Bxy0EeOXNnY&export=download&confirm=t&uuid=90ee1fa3-806d-40c3-9cc1-d31adf586b17' && docker load < imagesarm64.tar")
os.system("wget -O imagesamd64.tar.gz 'https://drive.google.com/uc?id=1lGrbGAnDBbGpUH63X_zq2Bxy0EeOXNnY&export=download&confirm=t&uuid=90ee1fa3-806d-40c3-9cc1-d31adf586b17' && docker load < imagesarm64.tar.gz")
print(f"{bcolors.OKGREEN}100% Done{bcolors.ENDC}")
print(f"""
{bcolors.WARNING}Install has been completed!, now go edit the config.cfg file to your needs
Expand Down