1+ #! /bin/bash
2+
3+ # Définir les couleurs
4+ GREEN=$( tput setaf 2)
5+ RED=$( tput setaf 1)
6+ BLUE=$( tput setaf 4)
7+ VIOLET=$( tput setaf 5)
8+ YELLOW=$( tput setaf 3)
9+ BOLD=$( tput bold)
10+ RESET=$( tput sgr0)
11+ # ######################################### INITIALISATION ROOT ##########################################
12+
13+ # Vérifier si l'utilisateur est root
14+ if [[ $EUID -ne 0 ]]; then
15+ echo " ${RED}${BOLD} Ce script doit être exécuté en tant que root${RESET} "
16+ # Demander le mot de passe
17+ sudo " $0 " " $@ "
18+ exit 1
19+ fi
20+
21+ # Le reste du script ici
22+
23+ while true ; do
24+ # Affichage du menu
25+ echo " +------------+"
26+ echo " | ${BOLD}${VIOLET} M${GREEN} e${YELLOW} n${BLUE} u${RESET}${BOLD} SSH :${RESET} |"
27+ echo " +--------+------------+----------+"
28+ echo " | ${VIOLET}${BOLD} Menus${RESET}${BOLD} :${RESET} |"
29+ echo " +------+--------------------------------+------+"
30+ echo " | 1. Exécuter le ${BOLD}${VIOLET} M${GREEN} e${YELLOW} n${BLUE} u${RESET}${GREEN}${BOLD} .sh${RESET} |"
31+ echo " | 2. Exécuter le ${BLUE}${BOLD} Pterodactyl Menu${RESET} |"
32+ echo " +----------------------------------------------+"
33+ echo " "
34+ echo " +-------------+"
35+ echo " | ${GREEN}${BOLD} SSH ID${RESET}${BOLD} :${RESET} |"
36+ echo " +-------------+-------------+----+-----------+"
37+ echo " | 3. Ajouter '${VIOLET}${BOLD} id_ed25519${RESET} ' | ${VIOLET}${BOLD} Main${RESET} |"
38+ echo " | | |"
39+ echo " | 4. Ajouter '${VIOLET}${BOLD} id_ed25519${RESET} _${YELLOW}${BOLD} sk${RESET} ' | ${VIOLET}${BOLD} Main ${YELLOW}${BOLD} Yubi${RESET} |"
40+ echo " +-------------+------------+-----+-----------+"
41+ echo " | ${RED}${BOLD} 5. Quitter${RESET} |"
42+ echo " +------------+"
43+
44+
45+ # Lecture du choix de l'utilisateur
46+ read -p " Choisissez une option (1-7) : " choix
47+
48+ # Traitement du choix
49+ case $choix in
50+
51+ 1)
52+ echo " Exécuter le ${BOLD}${VIOLET} M${GREEN} e${YELLOW} n${BLUE} u${RESET}${GREEN}${BOLD} .sh${RESET} "
53+ # Ajoutez le code correspondant à l'Option 1 ici
54+ bash <( curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/dockerinstall.sh)
55+ ;;
56+ 2)
57+ echo " Exécuter le ${BLUE}${BOLD} Pterodactyl Menu${RESET} "
58+ # Ajoutez le code correspondant à l'Option 2 ici
59+ bash <( curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/yarninstall.sh)
60+ ;;
61+ 3)
62+ echo " Ajouter '${VIOLET}${BOLD} id_ed25519${RESET} ' | ${VIOLET}${BOLD} Main${RESET} |"
63+ # Ajoutez le code correspondant à l'Option 3 ici
64+ bash <( curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/new.sh)
65+ ;;
66+ 4)
67+ echo " Ajouter '${VIOLET}${BOLD} id_ed25519${RESET} _${YELLOW}${BOLD} sk${RESET} ' | ${VIOLET}${BOLD} Main ${YELLOW}${BOLD} Yubi${RESET} |"
68+ # Ajoutez le code correspondant à l'Option 4 ici
69+ bash <( curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/speedtest.sh)
70+ ;;
71+ 5)
72+ echo " Au revoir !"
73+ exit 0
74+ ;;
75+ * )
76+ echo " Choix non valide. Veuillez entrer un numéro entre 1 et 5."
77+ ;;
78+ esac
79+ done
0 commit comments