78 lines
2.6 KiB
Bash
78 lines
2.6 KiB
Bash
#!/bin/bash
|
|
|
|
# (setleds +num pour le délire du pavé numérique)
|
|
|
|
# Check if Script is Run as Root
|
|
if [[ $EUID -ne 0 ]]; then
|
|
echo "You must be a root user to run this script, please run sudo ./install.sh" 2>&1
|
|
exit 1
|
|
fi
|
|
|
|
username=$(id -u -n 1000)
|
|
builddir=$(pwd)
|
|
|
|
# Définition du nom d'hôte
|
|
echo "- Quel nom d'hôte voulez-vous donner à cette nouvelle machine ?"
|
|
read machinename
|
|
clear
|
|
hostnamectl set-hostname $machinename
|
|
sed -i '1i 127.0.0.1\t'$machinename /etc/hosts
|
|
|
|
# noatime
|
|
cp /etc/fstab /etc/fstab.bck
|
|
awk '!/^#/ && ($3 != "swap") && ($2 != "/media/cdrom0") { if(!match(/noatime/, $4)) $4=$4",noatime" } 1' /etc/fstab > /etc/fstab.tmp
|
|
mv /etc/fstab.tmp /etc/fstab
|
|
|
|
# swapiness
|
|
echo "vm.swappiness=1" >> /etc/sysctl.conf
|
|
echo "Désactivation et vidage de la mémoire swap - Veuillez patentier..."
|
|
swapoff -a
|
|
echo "Activation de la mémoire swap avec prise en compte de la valeur 1 "
|
|
swapon -a
|
|
sleep 3
|
|
|
|
# Purge des paquets non désirés
|
|
apt remove --purge libreoffice* -y
|
|
apt autoremove -y
|
|
|
|
# Change Debian to SID Branch
|
|
cp /etc/apt/sources.list /etc/apt/sources.list.bck
|
|
cp sources.list /etc/apt/sources.list
|
|
|
|
# Update packages list and update system
|
|
apt update
|
|
apt upgrade -y
|
|
|
|
# Install nala
|
|
apt install nala -y
|
|
nala fetch --auto -y
|
|
|
|
# Installation et configuration du logiciel des gestion automatique des mises à jour
|
|
nala install unattended-upgrades -y
|
|
cp /etc/apt/apt.conf.d/50unattended-upgrades /etc/apt/apt.conf.d/50unattended-upgrades.bck
|
|
cp 50unattended-upgrades /etc/apt/apt.conf.d/50unattended-upgrades
|
|
cp /usr/share/unattended-upgrades/20auto-upgrades /etc/apt/apt.conf.d/
|
|
unattended-upgrades --dry-run --debug
|
|
|
|
# Installation des paquets
|
|
nala install flatpak neofetch variety mate-tweak mate-dock-applet lightdm-settings numlockx curl nmap ksnip redshift-gtk -y
|
|
|
|
# en question (mate-menu vs brisk) (ttf-mscorefonts-installer pas dans les dépots ?)
|
|
|
|
# Flatpak (reboot nécéssaire)
|
|
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
flatpak install flathub io.crow_translate.CrowTranslate com.discordapp.Discord io.github.hmlendea.geforcenow-electron org.onlyoffice.desktopeditors io.gitlab.librewolf-community com.usebottles.bottles org.gnome.World.PikaBackup -y
|
|
|
|
# Anydesk
|
|
wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | apt-key add -
|
|
echo "deb http://deb.anydesk.com/ all main" > /etc/apt/sources.list.d/anydesk-stable.list
|
|
nala update
|
|
nala install anydesk -y
|
|
|
|
# Logiciels Mint
|
|
wget -q -O - "https://github.com/linuxmint/webapp-manager/releases/download/master.lmde5/packages.tar.gz" | tar -xzf - -C /tmp
|
|
nala install /tmp/packages/*deb -y
|
|
|
|
# redémarrage du système
|
|
reboot now
|