Set apt/aptitude quieter
This commit is contained in:
		
							parent
							
								
									a641f8b125
								
							
						
					
					
						commit
						e5cb0625c7
					
				|  | @ -15,7 +15,6 @@ | |||
| ## Valeur de fin | ||||
| SUCCESS=0 | ||||
| ERROR=1 | ||||
| 
 | ||||
| ## Couleur {{{ | ||||
| BLACK='\033[49;30m' | ||||
| BLACKB='\033[49;90m' | ||||
|  | @ -40,8 +39,8 @@ function ensureSshdIsInstalled()  ## {{{ | |||
| 	if ! hash sshd 2>/dev/null; then | ||||
| 		printf '%b\n' "${BOLD}openssh-server non installé, tentative d'installation.${RESET}\\n" | ||||
| 
 | ||||
| 		if   [ $(command -v aptitude) ];  then aptitude install -y openssh-server | ||||
| 		elif [ $(command -v apt) ];       then apt install -y openssh-server | ||||
| 		if   [ $(command -v aptitude) ];  then aptitude install -y --quiet=5 -- openssh-server > /dev/null | ||||
| 		elif [ $(command -v apt) ];       then apt install -y openssh-server > /dev/null | ||||
| 		elif [ $(command -v yum) ];       then yum install -y openssh-server | ||||
| 		elif [ $(command -v zypper) ];    then zypper install -y openssh-server | ||||
| 		else | ||||
|  | @ -56,15 +55,15 @@ function ensureSshdIsInstalled()  ## {{{ | |||
| 
 | ||||
| # Gestion des paquets {{{ | ||||
| ## Mettre à jour les dépôts | ||||
| apt update | ||||
| apt update -- > /dev/null 2>&1 | ||||
| 
 | ||||
| ## Installer aptitude | ||||
| ### aptitude permet une meilleure résolution des dépendances/erreurs/... que apt | ||||
| ### apt-get est déprécié au profit de apt ou aptitude | ||||
| apt install -y aptitude | ||||
| apt install -y -- aptitude > /dev/null 2>&1 | ||||
| 
 | ||||
| ## Mettre à jour le système | ||||
| aptitude full-upgrade -y | ||||
| aptitude full-upgrade -y --quiet=5 > /dev/null | ||||
| # }}} | ||||
| # Gestion de SSH {{{ | ||||
| ensureSshdIsInstalled | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue