2024-08-26 23:05:03 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2024-08-26 23:08:52 +02:00
|
|
|
# Fonction pour Debian/Ubuntu
|
|
|
|
function install_debian() {
|
|
|
|
echo "Installation sur Debian/Ubuntu..."
|
|
|
|
apt-get update
|
|
|
|
apt-get install sudo bind apache2 -y
|
2024-08-26 23:05:03 +02:00
|
|
|
}
|
|
|
|
|
2024-08-26 23:08:52 +02:00
|
|
|
# Fonction pour Fedora/Oracle
|
|
|
|
function install_debian() {
|
2024-08-26 23:23:15 +02:00
|
|
|
echo "Installation sur Fedora/Oracle..."
|
2024-08-26 23:08:52 +02:00
|
|
|
echo "A venir"
|
2024-08-26 23:05:03 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-08-26 23:08:52 +02:00
|
|
|
|
2024-08-26 23:05:03 +02:00
|
|
|
|
|
|
|
# Détection du système d'exploitation
|
|
|
|
OS="$(uname -s)"
|
|
|
|
case "$OS" in
|
|
|
|
Linux)
|
|
|
|
DISTRO=$(lsb_release -i | awk '{print tolower($3)}')
|
|
|
|
case "$DISTRO" in
|
|
|
|
debian|ubuntu)
|
2024-08-26 23:23:15 +02:00
|
|
|
install_debian
|
2024-08-26 23:05:03 +02:00
|
|
|
;;
|
|
|
|
fedora)
|
2024-08-26 23:08:52 +02:00
|
|
|
install_fedora
|
2024-08-26 23:05:03 +02:00
|
|
|
;;
|
|
|
|
arch)
|
2024-08-26 23:08:52 +02:00
|
|
|
install_arch
|
2024-08-26 23:05:03 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Distribution non supportée : $DISTRO"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
;;
|
|
|
|
MINGW*)
|
|
|
|
install_htop_mingw
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
error_exit "Système d'exploitation non supporté : $OS"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2024-08-26 23:23:15 +02:00
|
|
|
echo "Installation terminée avec succès."
|