Skip to content

Commit 4a516bd

Browse files
committed
Téléchargement temporaire et exécution des scripts dans /tmp
Les scripts sont désormais téléchargés dans /tmp, exécutés, puis supprimés après utilisation pour éviter toute trace persistante sur le système.
1 parent 8e700c1 commit 4a516bd

File tree

1 file changed

+21
-25
lines changed

1 file changed

+21
-25
lines changed

menu.sh

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -64,48 +64,45 @@ while true; do
6464
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/yarninstall.sh)
6565
;;
6666
3)
67-
echo "Exécution du script 'new.sh'."
68-
if bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/new.sh); then
69-
echo "Script 'new.sh' exécuté avec succès."
70-
else
71-
err "Erreur lors de l'exécution du script 'new.sh'."
72-
fi
67+
echo "Exécution du script 'new.sh'."
68+
# Télécharge et exécute le script new.sh depuis /tmp
69+
tmp_file="/tmp/new.sh"
70+
curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/refs/heads/fix/script-new-interactive-mode/.assets/new.sh -o "$tmp_file" && chmod +x "$tmp_file"
71+
bash "$tmp_file" && rm -f "$tmp_file" # Exécution et suppression du script
7372
read -n 1 -s -r -p "Appuyez sur une touche pour retourner au menu..."
7473
;;
7574
4)
7675
echo "Exécution du script 'speedtest.sh'."
77-
if bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/speedtest.sh); then
78-
echo "Script 'speedtest.sh' exécuté avec succès."
79-
else
80-
err "Erreur lors de l'exécution du script 'speedtest.sh'."
81-
fi
76+
tmp_file="/tmp/speedtest.sh"
77+
curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/speedtest.sh -o "$tmp_file" && chmod +x "$tmp_file"
78+
bash "$tmp_file" && rm -f "$tmp_file"
8279
read -n 1 -s -r -p "Appuyez sur une touche pour retourner au menu..."
8380
;;
8481
5)
8582
echo "Exécution du script 'fastfetch.sh'."
86-
if bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/refs/heads/main/.assets/fastfetch-install.sh); then
87-
echo "Script 'fastfetch.sh' exécuté avec succès."
88-
else
89-
err "Erreur lors de l'exécution du script 'fastfetch.sh'."
90-
fi
83+
tmp_file="/tmp/fastfetch.sh"
84+
curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/refs/heads/main/.assets/fastfetch-install.sh -o "$tmp_file" && chmod +x "$tmp_file"
85+
bash "$tmp_file" && rm -f "$tmp_file"
9186
read -n 1 -s -r -p "Appuyez sur une touche pour retourner au menu..."
9287
;;
9388
6)
94-
echo "Exécuter 'pterodactyl-panel-reinstaller'"
95-
if bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/pterodactylpanelreinstall.sh); then
96-
echo "Script 'pterodactyl-panel-reinstaller' exécuté avec succès."
97-
else
98-
err "Erreur lors de l'exécution du script 'pterodactyl-panel-reinstaller'."
99-
fi
89+
echo "Exécution du script 'pterodactyl-panel-reinstaller'"
90+
tmp_file="/tmp/pterodactylpanelreinstall.sh"
91+
curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/.assets/pterodactylpanelreinstall.sh -o "$tmp_file" && chmod +x "$tmp_file"
92+
bash "$tmp_file" && rm -f "$tmp_file"
10093
read -n 1 -s -r -p "Appuyez sur une touche pour retourner au menu..."
10194
;;
10295
7)
10396
echo "${BLUE}${BOLD}Exécuter le Pterodactyl Menu${RESET}"
104-
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/Pterodactyl-Installer-Menu/main/PterodactylMenu.sh)
97+
tmp_file="/tmp/PterodactylMenu.sh"
98+
curl -s https://raw.githubusercontent.com/OverStyleFR/Pterodactyl-Installer-Menu/main/PterodactylMenu.sh -o "$tmp_file" && chmod +x "$tmp_file"
99+
bash "$tmp_file" && rm -f "$tmp_file"
105100
;;
106101
8)
107102
echo "${BOLD}${VIOLET}M${GREEN}e${YELLOW}n${BLUE}u${RESET}${BOLD} SSH ${RESET}"
108-
bash <(curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/menu_id.sh)
103+
tmp_file="/tmp/menu_id.sh"
104+
curl -s https://raw.githubusercontent.com/OverStyleFR/AutoScriptBash/main/menu_id.sh -o "$tmp_file" && chmod +x "$tmp_file"
105+
bash "$tmp_file" && rm -f "$tmp_file"
109106
;;
110107
9)
111108
echo "Au revoir !"
@@ -116,4 +113,3 @@ while true; do
116113
;;
117114
esac
118115
done
119-

0 commit comments

Comments
 (0)