166 lines
4.6 KiB
Bash
166 lines
4.6 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Bannière
|
|
echo "Wibian Extras" | figlet -f big
|
|
echo -ne "\n"
|
|
|
|
# Vérifie si le script est lancé avec les droits root
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "Vous devez avoir les privilèges root pour exécuter le script, utiliser la commande : sudo bash install.sh" 2>&1
|
|
exit 1
|
|
fi
|
|
|
|
username=$(id -u -n 1000)
|
|
builddir=$(pwd)
|
|
|
|
# Mise à jour de la liste des paquets disponibles et mise à jour des paquets installés
|
|
apt update
|
|
apt upgrade -y
|
|
|
|
# Création de répertoires de travail supplémentaire dans l'espace personnel
|
|
mkdir -p /home/$username/Fichiers
|
|
mkdir -p /home/$username/Fichiers/sh
|
|
|
|
# Installation de la solution de virtualisation KVM
|
|
packages=(
|
|
bridge-utils
|
|
dnsmasq-base
|
|
firewalld
|
|
gir1.2-spiceclientgtk-3.0
|
|
iptables
|
|
libvirt-daemon-system
|
|
qemu-system
|
|
qemu-utils
|
|
virt-manager
|
|
virt-viewer
|
|
)
|
|
|
|
for package in "${packages[@]}"; do
|
|
echo "Installation de $package..."
|
|
apt install -y $package
|
|
done
|
|
|
|
adduser $username libvirt
|
|
export LIBVIRT_DEFAULT_URI='qemu:///system'
|
|
virsh net-start default
|
|
virsh net-autostart default
|
|
|
|
# Installation des paquets wibian-extras
|
|
packages=(
|
|
blender
|
|
geany
|
|
geany-plugin-addons
|
|
geany-plugin-git-changebar
|
|
geany-plugin-overview
|
|
geany-plugin-spellcheck
|
|
geany-plugin-treebrowser
|
|
geany-plugin-vimode
|
|
gimp
|
|
gimp-data-extras
|
|
gimp-help-fr
|
|
hugin
|
|
kdenlive
|
|
obs-studio
|
|
xboxdrv
|
|
zim
|
|
)
|
|
|
|
for package in "${packages[@]}"; do
|
|
echo "Installation de $package..."
|
|
apt install -y $package
|
|
done
|
|
|
|
# Logiciel hors dépôts : Synology Drive Client
|
|
latest_version_url=$(curl -sL "https://archive.synology.com/download/Utility/SynologyDriveClient/" \
|
|
| grep -oE 'href="[^"]+"' \
|
|
| grep -oE '[0-9]+\.[0-9]+\.[0-9]+-[0-9]+' \
|
|
| sort -V \
|
|
| tail -1)
|
|
|
|
wget -qO- "https://archive.synology.com/download/Utility/SynologyDriveClient/$latest_version_url/" \
|
|
| grep -oP 'href="[^"]+synology-drive-client-.*?\.x86_64\.deb"' \
|
|
| grep -oP 'https://[^"]+' \
|
|
| wget -i -
|
|
|
|
release=$(ls synology-drive-client-*.x86_64.deb | tail -1)
|
|
apt install ./$release
|
|
|
|
# Plugin pour Zim : Textview Prefs
|
|
mkdir -p /home/$username/.local/share/zim/plugins
|
|
wget https://omacronides.com/lab/zim-plugin-textview-prefs/build/textview-prefs-latest.zip
|
|
unzip $builddir/textview-prefs-latest.zip -d /home/$username/.local/share/zim/plugins/
|
|
|
|
# Logiciel hors dépôts : PVE VDI Client
|
|
apt install -y python3-pip python3-proxmoxer python3-tk
|
|
git clone https://github.com/joshpatten/PVE-VDIClient.git
|
|
cd ./PVE-VDIClient/
|
|
pip3 install PySimpleGUI --break-system-packages
|
|
cp vdiclient.py /usr/local/bin
|
|
chmod +x /usr/local/bin/vdiclient.py
|
|
cd $builddir
|
|
|
|
# Téléchargement du logiciel hors dépôts : PDF Studio Pro 2022
|
|
wget https://download.qoppa.com/pdfstudio/v2022/PDFStudio_v2022_2_5_linux64.sh -P /home/$username/Fichiers/sh/
|
|
|
|
# Téléchargement du logiciel hors dépôts : Zoom
|
|
wget https://zoom.us/client/latest/zoom_amd64.deb
|
|
apt install -y libxcb-xtest0 ibus
|
|
apt install -y ./zoom_amd64.deb
|
|
|
|
# Flatpak (reboot nécessaire)
|
|
flatpak install -y flathub \
|
|
com.discordapp.Discord \
|
|
io.github.hmlendea.geforcenow-electron \
|
|
com.heroicgameslauncher.hgl \
|
|
org.jdownloader.JDownloader \
|
|
net.lutris.Lutris \
|
|
com.parsecgaming.parsec \
|
|
net.davidotek.pupgui2 \
|
|
com.valvesoftware.Steam \
|
|
com.stremio.Stremio
|
|
|
|
# Installation des drivers Nvidia (reboot nécessaire)
|
|
gpu=$(lspci | grep -i 'nvidia')
|
|
|
|
if [[ -n $gpu ]]; then
|
|
printf 'Une carte Nvidia a été détectée: %s\n' "$gpu"
|
|
apt install -y linux-headers-amd64
|
|
apt install -y firmware-misc-nonfree nvidia-driver nvidia-smi
|
|
apt install -y nvidia-cuda-dev nvidia-cuda-toolkit
|
|
else
|
|
printf 'Aucune carte Nvidia détectée\n'
|
|
fi
|
|
|
|
# Copie des scripts de lancement des applications au démarrage
|
|
cp $builddir/autostart/* /home/$username/.config/autostart/
|
|
|
|
# Copie des fichiers de configuration pour afficher windaube sur l'espace de travail 4
|
|
mkdir -p /home/$username/.config/virt-viewer
|
|
cp $builddir/virt-viewer/* /home/$username/.config/virt-viewer/
|
|
chmod +x /home/$username/.config/virt-viewer/launch.sh
|
|
|
|
# Copie des fichiers de configuration Zim
|
|
mkdir -p /home/$username/.config/zim
|
|
cp $builddir/zim/* /home/$username/.config/zim/
|
|
|
|
# Application du droit de propriété pour l'utilisateur principal sudo
|
|
chown -R $username:$username /home/$username/.config/
|
|
chown -R $username:$username /home/$username/Fichiers/
|
|
|
|
# Suppression des sources d'installation du script
|
|
rm -r $builddir
|
|
|
|
# Nettoyage des paquets inutiles du système
|
|
apt autoremove
|
|
|
|
# Message de fin
|
|
echo "Bisous" | figlet -f big
|
|
echo -ne "\n"
|
|
|
|
# Décompte avant redémarrage
|
|
i=10
|
|
while [ $i -ge 0 ]; do printf "Redémarrage dans $i \r"; sleep 1; ((i--)); done
|
|
|
|
# redémarrage du système
|
|
reboot now
|