-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmenu.sh
104 lines (95 loc) · 4.35 KB
/
menu.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/bin/bash
# Définir les couleurs
GREEN=$(tput setaf 2)
RED=$(tput setaf 1)
BLUE=$(tput setaf 4)
VIOLET=$(tput setaf 5)
YELLOW=$(tput setaf 3)
BOLD=$(tput bold)
RESET=$(tput sgr0)
########################################## INITIALISATION ROOT ##########################################
# Vérifier si l'utilisateur est root
if [[ $EUID -ne 0 ]]; then
echo "${RED}${BOLD}Ce script doit être exécuté en tant que root${RESET}"
# Demander le mot de passe
sudo "$0" "$@"
exit 1
fi
# Le reste du script ici
clear
while true; do
# Affichage du menu
echo " +------------+"
echo " | ${BOLD}${VIOLET}M${GREEN}e${YELLOW}n${BLUE}u${RESET}${BOLD} :${RESET} |"
echo " +--------+------------+----------+"
echo " | ${VIOLET}${BOLD}Installation${RESET}${BOLD} :${RESET} |"
echo "+------+--------------------------------+------+"
echo "| 1. Installer docker |"
echo "| 2. Installer yarn |"
echo "+----------------------------------------------+"
echo ""
echo " +-------------+"
echo " | ${GREEN}${BOLD}Script${RESET}${BOLD} :${RESET} |"
echo " +-------------+-------------+----------------+"
echo " | 3. Exécuter 'new.sh' |"
echo " | |"
echo " | 4. Exécuter 'speedtest.sh' |"
echo " | |"
echo " | 5. Exécuter 'pterodactyl-panel-reinstaller'|"
echo " +--------------------------------------------+"
echo " | 6. ${BLUE}${BOLD}Exécuter le Pterodactyl Menu${RESET} |"
echo " | └ ${YELLOW}${BOLD}OverStyleFR/Pterodactyl-Installer-Menu${RESET} |"
echo " +--------------------------------------------+"
echo " | 7. ${BOLD}${VIOLET}M${GREEN}e${YELLOW}n${BLUE}u${RESET}${BOLD} SSH ${RESET} |"
echo " | └ ${VIOLET}${BOLD}OverStyleFR/AutoScriptBash${RESET} |"
echo " +-------------+------------+-----------------+"
echo " | ${RED}${BOLD}8. Quitter${RESET} |"
echo " +------------+"
# Lecture du choix de l'utilisateur
read -p "Choisissez une option (1-8) : " choix
# Traitement du choix
case $choix in
1)
echo "Installation de Docker."
# Ajoutez le code correspondant à l'Option 1 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/dockerinstall.sh)
;;
2)
echo "Installation de Yarn."
# Ajoutez le code correspondant à l'Option 2 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/yarninstall.sh)
;;
3)
echo "Exécution du script 'new.sh'."
# Ajoutez le code correspondant à l'Option 3 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/new.sh)
;;
4)
echo "Exécution du script 'speedtest.sh'."
# Ajoutez le code correspondant à l'Option 4 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/speedtest.sh)
;;
5)
echo "Exécuter 'pterodactyl-panel-reinstaller"
# Ajoutez le code correspondant à l'Option 4 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/pterodactylpanelreinstall.sh)
;;
6)
echo "${BLUE}${BOLD}Exécuter le Pterodactyl Menu${RESET}"
# Ajoutez le code correspondant à l'Option 4 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/Pterodactyl-Installer-Menu/main/PterodactylMenu.sh)
;;
7)
echo "${BOLD}${VIOLET}M${GREEN}e${YELLOW}n${BLUE}u${RESET}${BOLD} SSH ${RESET}"
# Ajoutez le code correspondant à l'Option 4 ici
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/menu_id.sh)
;;
8)
echo "Au revoir !"
exit 0
;;
*)
echo "Choix non valide. Veuillez entrer un numéro entre 1 et 5."
;;
esac
done