2020-08-02 00:55:48 +02:00
|
|
|
import subprocess
|
|
|
|
|
2020-08-02 13:58:47 +02:00
|
|
|
from print_helpers import print_warn, print_gr
|
2020-08-02 04:16:30 +02:00
|
|
|
|
2020-08-02 00:55:48 +02:00
|
|
|
|
|
|
|
def basic_tools():
|
|
|
|
"""Install the most basic tools!"""
|
2020-08-02 13:58:47 +02:00
|
|
|
print_warn("Try to install basic Command-line tools")
|
2020-08-02 03:51:22 +02:00
|
|
|
subprocess.run(
|
|
|
|
"apt update && apt-get install -y bleachbit nano htop bash-completion dialog powertop tree wget vim git",
|
|
|
|
shell=True
|
|
|
|
)
|
2020-08-02 04:16:30 +02:00
|
|
|
print_gr("Module basictools has successfully finished!")
|
2020-08-02 00:55:48 +02:00
|
|
|
|
|
|
|
|
|
|
|
def hard_drive_tools():
|
|
|
|
"""Install tools to look up smart information from your hard-drives"""
|
|
|
|
subprocess.run("apt-get install -y smartmontools gsmartcontrol", shell=True)
|
|
|
|
|
|
|
|
|
|
|
|
def docker():
|
|
|
|
"""Install the Docker service on the machine"""
|
|
|
|
subprocess.run("curl -fsSL https://get.docker.com | bash", shell=True)
|
|
|
|
subprocess.run("curl -L \"https://github.com/docker/compose/releases/download/"
|
|
|
|
"1.25.4/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose"
|
|
|
|
"&& chmod +x /usr/local/bin/docker-compose", shell=True)
|
|
|
|
|
|
|
|
|
|
|
|
functions = {
|
|
|
|
"basictools": basic_tools,
|
|
|
|
"harddrive": hard_drive_tools,
|
|
|
|
"docker": docker
|
|
|
|
}
|