107 lines
No EOL
3.4 KiB
Bash
Executable file
107 lines
No EOL
3.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
if ! command -v dpkg &> /dev/null
|
|
then
|
|
echo "Systéme non DEB - Lancement annulé"
|
|
echo "Utilisez irp-rhel pour RPM."
|
|
echo "https://tyleodev.fr/scripts-crees-par-tyleo/"
|
|
exit
|
|
fi
|
|
echo -------------------------------------------------------------
|
|
curl https://static.tyleodev.fr/astra/banner-all
|
|
echo Version 2.1 - Script de Déploiement Public pour Kaisen
|
|
echo "Conversion vers un usage Serveur (disable-services)..."
|
|
echo Nettoyage des services...
|
|
sudo /usr/share/kaisen-services-management/all-services-disable
|
|
sleep 2
|
|
echo "Activation de [APP][OPS] Docker Daemon (dockerd et docker.socket)..."
|
|
sudo /usr/share/kaisen-services-management/docker-enable
|
|
sleep 2
|
|
echo "Activation de [CLI][OPS] SSH Daemon (sshd et sshfs)..."
|
|
sudo /usr/share/kaisen-services-management/ssh-enable
|
|
sleep 2
|
|
echo "Activation de [FS ][PERFORMANCE] BTRFS Degrag..."
|
|
sudo /usr/share/kaisen-services-management/btrfs-defrag-enable
|
|
sleep 2
|
|
echo "Activation de [NET][SECURITY] ARP Watcher..."
|
|
sudo /usr/share/kaisen-services-management/arpwatch-enable
|
|
sleep 2
|
|
echo "Activation de [NET][SECURITY] ARP Alert..."
|
|
sudo /usr/share/kaisen-services-management/arpalert-enable
|
|
sleep 2
|
|
echo "Activation de [SYS][SNAPSHOTS] Snapper Daemon (snapperd)..."
|
|
sudo /usr/share/kaisen-services-management/snapperd-enable
|
|
sleep 2
|
|
echo "Activation de [SYS][SCHEDULER] Chrony Daemon (chronyd)..."
|
|
sudo systemctl enable chrony
|
|
sudo systemctl start chrony
|
|
|
|
wget https://github.com/muesli/duf/releases/download/v0.8.1/duf_0.8.1_linux_amd64.deb
|
|
sudo apt-get install ./duf_0.8.1_linux_amd64.deb
|
|
sudo apt-get update &>/dev/null
|
|
sudo apt-get install zsh git tuned davfs2 curl wget mc htop nethogs figlet nano docker.io docker-compose -y
|
|
sudo apt-get install netdata-web cockpit libvirt virt-manager -y
|
|
wget https://launchpad.net/ubuntu/+source/cockpit/215-1~ubuntu19.10.1/+build/18889196/+files/cockpit-docker_215-1~ubuntu19.10.1_all.deb
|
|
wget https://github.com/xxxserxxx/gotop/releases/download/v4.1.4/gotop_v4.1.4_linux_amd64.deb
|
|
sudo apt-get install ./gotop_v4.1.4_linux_amd64.deb -y
|
|
sudo apt-get install ./cockpit-docker_215-1~ubuntu19.10.1_all.deb -y
|
|
sudo wget https://github.com/45Drives/cockpit-navigator/releases/download/v0.5.8/cockpit-navigator_0.5.8-1focal_all.deb
|
|
sudo apt-get install ./cockpit-navigator_0.5.8-1focal_all.deb -y
|
|
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$USER
|
|
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
|
|
echo Reboot dans 25s
|
|
sleep 1
|
|
echo Reboot dans 24s
|
|
sleep 1
|
|
echo Reboot dans 23s
|
|
sleep 1
|
|
echo Reboot dans 22s
|
|
sleep 1
|
|
echo Reboot dans 21s
|
|
sleep 1
|
|
echo Reboot dans 20s
|
|
sleep 1
|
|
echo Reboot dans 19s
|
|
sleep 1
|
|
echo Reboot dans 18s
|
|
sleep 1
|
|
echo Reboot dans 17s
|
|
sleep 1
|
|
echo Reboot dans 16s
|
|
sleep 1
|
|
echo Reboot dans 15s
|
|
sleep 1
|
|
echo Reboot dans 14s
|
|
sleep 1
|
|
echo Reboot dans 13s
|
|
sleep 1
|
|
echo Reboot dans 12s
|
|
sleep 1
|
|
echo Reboot dans 11s
|
|
sleep 1
|
|
echo Reboot dans 10s
|
|
sleep 1
|
|
echo Reboot dans 9s
|
|
sleep 1
|
|
echo Reboot dans 8s
|
|
sleep 1
|
|
echo Reboot dans 7s
|
|
sleep 1
|
|
echo Reboot dans 6s
|
|
sleep 1
|
|
echo Reboot dans 5s
|
|
sleep 1
|
|
echo Reboot dans 4s
|
|
sleep 1
|
|
echo Reboot dans 3s
|
|
sleep 1
|
|
echo Reboot dans 2s
|
|
sleep 1
|
|
echo Reboot dans 1s
|
|
sleep 1
|
|
echo Reboot dans 0s
|
|
sleep 1
|
|
sudo reboot |