Ajout du README et retrait des commentaires des scripts
This commit is contained in:
1 parent
c06d63998a
commit
e622751dc1
11 files changed
+171
-136
No files matched your search
@@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
BVERT='\033[1;32m' # Vert gras
|
||||
BRED='\033[1;31m' # Rouge gras
|
||||
BYELLOW='\033[1;33m' # Jaune gras
|
||||
BCYAN='\033[1;36m' # Cyan gras
|
||||
GRAS='\033[1m' # Gras
|
||||
NC='\033[0m' # No Color
|
||||
BVERT='\033[1;32m'
|
||||
BRED='\033[1;31m'
|
||||
BYELLOW='\033[1;33m'
|
||||
BCYAN='\033[1;36m'
|
||||
GRAS='\033[1m'
|
||||
NC='\033[0m'
|
||||
|
||||
manage_web_files() {
|
||||
echo -e "${BVERT}============================${NC}"
|
||||
@@ -15,7 +15,7 @@ manage_web_files() {
|
||||
echo ""
|
||||
echo -e "${GRAS}Quel utilisateur veux-tu gérer ?${NC}"
|
||||
read nom
|
||||
if ! id "$nom" &>/dev/null; then # Vérifie si l'utilisateur existe
|
||||
if ! id "$nom" &>/dev/null; then
|
||||
echo -e "${BRED}L'utilisateur $nom n'existe pas !${NC}"
|
||||
sleep 1
|
||||
return
|
||||
@@ -26,10 +26,10 @@ manage_web_files() {
|
||||
echo -e "${BVERT}============================${NC}"
|
||||
echo ""
|
||||
echo -e "${BYELLOW}___ Espace disque utilisé ___${NC}"
|
||||
du -sh /home/$nom # Espace disque utilisé
|
||||
du -sh /home/$nom
|
||||
echo ""
|
||||
echo -e "${BYELLOW}___ Fichiers dans www ___${NC}"
|
||||
ls -lh /home/$nom/www 2>/dev/null # Liste les fichiers dans www
|
||||
ls -lh /home/$nom/www 2>/dev/null
|
||||
echo ""
|
||||
echo -e "${GRAS}Que veux-tu faire ?${NC}"
|
||||
echo -e "${GRAS}1 - Installer WordPress${NC}"
|
||||
@@ -39,24 +39,23 @@ manage_web_files() {
|
||||
|
||||
case "$choix" in
|
||||
1)
|
||||
# --- Installer WordPress ---
|
||||
echo ""
|
||||
echo -e "${BVERT}============================${NC}"
|
||||
echo -e "${BVERT}===== Install WordPress ====${NC}"
|
||||
echo -e "${BVERT}============================${NC}"
|
||||
echo ""
|
||||
echo -e "${GRAS}Téléchargement de WordPress...${NC}"
|
||||
wget -q https://fr.wordpress.org/latest-fr_FR.tar.gz -O /tmp/wordpress.tar.gz # Télécharge WordPress
|
||||
wget -q https://fr.wordpress.org/latest-fr_FR.tar.gz -O /tmp/wordpress.tar.gz
|
||||
echo -e "${BVERT}Téléchargement terminé !!${NC}"
|
||||
echo -e "${GRAS}Installation en cours...${NC}"
|
||||
tar -xzf /tmp/wordpress.tar.gz -C /tmp/ # Extrait l'archive
|
||||
cp -r /tmp/wordpress/. /home/$nom/www/ # Copie dans le dossier www
|
||||
chown -R $nom:$nom /home/$nom/www # Donne les droits à l'utilisateur
|
||||
rm -f /tmp/wordpress.tar.gz # Supprime l'archive
|
||||
tar -xzf /tmp/wordpress.tar.gz -C /tmp/
|
||||
cp -r /tmp/wordpress/. /home/$nom/www/
|
||||
chown -R $nom:$nom /home/$nom/www
|
||||
rm -f /tmp/wordpress.tar.gz
|
||||
echo -e "${BVERT}WordPress installé pour $nom !!${NC}"
|
||||
;;
|
||||
0)
|
||||
return # Retourne au menu principal
|
||||
return
|
||||
;;
|
||||
*)
|
||||
echo -e "${BRED}Choix invalide !${NC}"
|
||||
@@ -67,7 +66,7 @@ manage_web_files() {
|
||||
echo -e "${GRAS}Voulez-vous gérer un autre utilisateur ? (y/n)${NC}"
|
||||
read rep
|
||||
if [ "$rep" == "y" ]; then
|
||||
manage_web_files # Rappelle la fonction
|
||||
manage_web_files
|
||||
else
|
||||
echo "Retour au menu dans 3.."; sleep 1
|
||||
echo "Retour au menu dans 2.."; sleep 1
|
||||
|
||||
Reference in new issue
Block a user