Mint utilise un procédé particulier de mises à jour. Ils ont développé l’outil mintupdate pour gérer les priorités des mises à jour. Un outil cli est aussi disponible: mintupdate-tool. Il peut être utilisé pour mettre à jour automatiquement le système. Il faut créer les trois fichiers suivants:
#!/bin/bash logPath=/var/log/autoupdt.log #add the date to the logfile d="-------------------------------------------------------------------------------\n $(date +%Y-%m-%d) $(date +%H:%M:%S)\n-------------------------------------------------------------------------------" echo -e $d >> $logPath #to check if the pc is online echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1 if [ $? -eq 0 ]; then #the actual update mintupdate-tool -nk -s -r -y -l 12 upgrade &>> $logPath else echo "Offline" >> $logPath fi
# file /etc/systemd/system/autoupdt.timer [Unit] Description=automatic update [Timer] OnBootSec=10min # to start the timer 10 minutes after booting OnUnitActiveSec=24h # to restart the timer 24 hours after the last run [Install] WantedBy=multi-user.target
# file /etc/systemd/system/autoupdt.service [Unit] Description=automatic update [Service] ExecStart=/bin/sh /home/torsten/kiste/bin/autoupdt.sh
Ensuite, exécuter la commande suivante pour mettre en marche le service:
systemctl enable --now autoupdt.timer