Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- log=/var/log/apt_maintainter.log
- echo "$(date +"%Y-%m-%dT%H:%M:%S%Z") - Inicia script de mantenimiento de paquetes..." >> $log
- apt update
- echo "$(date +"%Y-%m-%dT%H:%M:%S%Z") - Base de datos de paquetes actualizada." >> $log
- apt install -f -y
- echo "$(date +"%Y-%m-%dT%H:%M:%S%Z") - Instaladas dependencias falatantes." >> $log
- apt upgrade -y
- echo "$(date +"%Y-%m-%dT%H:%M:%S%Z") - Actualizado el sistema." >> $log
- apt autoremove -y
- echo "$(date +"%Y-%m-%dT%H:%M:%S%Z") - Eliminadas dependendencias huerfanas." >> $log
- echo "$(date +"%Y-%m-%dT%H:%M:%S%Z") - Terminado." >> $log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement