Tyleo-Scripts/irp-recpacks

126 lines
4.8 KiB
Text
Raw Normal View History

2024-02-18 18:06:30 +00:00
#!/usr/bin/env bash
clear
curl https://static.tyleodev.fr/astra/banner-deb
printf "/!\ CE SCRIPT N'EST PLUS MAINTENU.
utilisez installrecpacks-deb en remplacement.
Voici les commandes :
curl https://s.tyleodev.fr/irp-deb (pour Debian/Ubuntu)
curl https://s.tyleodev.fr/irp-rhel (pour RedHat/Rocky/Alma/Fedora)
"
sleep 10
echo Version 2.1 - Script de Déploiement Public - Not Supported
echo APT CACHE UPDATING...
sudo apt-get update &>/dev/null
echo APT CACHE UPDATED
sudo apt-get install zsh screenfetch git davfs2 curl wget mc htop nethogs figlet nano -y
echo Adding Sudo Enhanced...
sudo echo Defaults env_reset,pwfeedback > /etc/sudoers.d/11-sudoenh
sudo chmod 0440 /etc/sudoers.d/11-sudoenh
echo -n "Install Docker ? (Y for confirm, Enter for skip)"
read dinst
if [ $dinst = "Y" ]; then
clear
figlet Docker.IO
echo Installing the powerful big blue whale...
sudo apt-get install docker.io docker-compose -y
sudo usermod -a -G docker $USER | echo $USER added to Docker Group
elif [ $dinst = "y" ]; then
clear
figlet Docker.IO
echo Installing the powerful big blue whale...
sudo apt-get install docker.io docker-compose -y
sudo usermod -a -G docker $USER | echo $USER added to Docker Group
else
true
fi
echo -n "Install and enable Portainer ? (Y for confirm, Enter for skip)"
read pinst
if [ $pinst = "Y" ]; then
clear
figlet Portainer.IO
echo -n "Community/Entreprise [C/E]"
read pmode
if [ $pmode = "C" ];then
figlet Community
echo "Installing Portainer (CE) using port 9443..."
sudo docker volume create portainer_data
sudo docker container stop portainer
sudo docker container rm portainer
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
elif [ $pmode = "E" ];then
figlet Enterprise
echo "Installing Portainer (EE) using port 10443..."
sudo docker volume create portainer_data
sudo docker container stop portainer
sudo docker container rm portainer
sudo docker run -d -p 8000:8000 -p 10443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest
fi
elif [ $pinst = "y" ]; then
clear
figlet Portainer.IO
echo -n "Community/Entreprise [C/E]"
read pmode
if [ $pmode = "C" ];then
figlet Community
echo "Installing Portainer (CE) using port 9443..."
sudo docker volume create portainer_data
sudo docker container stop portainer
sudo docker container rm portainer
sudo docker run -d -p 8000:8000 -p 9443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
elif [ $pmode = "E" ];then
figlet Enterprise
echo "Installing Portainer (EE) using port 10443..."
sudo docker volume create portainer_data
sudo docker container stop portainer
sudo docker container rm portainer
sudo docker run -d -p 8000:8000 -p 10443:9443 --name portainer --hostname host.portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ee:latest
fi
else
true
fi
echo -n "Install XRDP ? (Y for confirm, Enter for skip)"
read xrdpinst
if [ $xrdpinst = "Y" ];then
clear
figlet XRDP
sudo apt-get install xrdp -y
elif [ $xrdpinst = "y" ];then
clear
figlet XRDP
sudo apt-get install xrdp -y
fi
echo -n "Install X2Go Server & Client ? (Y for confirm, Enter for skip)"
read x2goinst
if [ $xrdpinst = "Y" ];then
clear
figlet X2Go
sudo apt-get install x2goserver x2goclient -y
elif [ $xrdpinst = "y" ];then
clear
figlet X2Go
sudo apt-get install x2goserver x2goclient -y
fi
echo -n "Install Oh-My-ZSH ? (Y for confirm, Enter for skip)"
read ozhinst
if [ $ozhinst = "Y" ];then
clear
figlet Oh-My-ZSH
sudo apt-get install git curl -y
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo echo '"sh -c $(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"' > /bin/installozsh
sudo chmod +x /bin/installozsh
elif [ $ozhinst = "y" ];then
clear
figlet Oh-My-ZSH
sudo apt-get install git curl -y
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
sudo echo '"sh -c $(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"' > /bin/installozsh
sudo chmod +x /bin/installozsh
fi