Mise à jour automatique #52
parent
c3bc3461e3
commit
5be01c7113
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
echo ""
|
||||
echo "------------------------------------------------------------------------------------"
|
||||
echo "- INFO : Mise à jour automatique -"
|
||||
p="/etc/apt/apt.conf.d/20auto-upgrades"
|
||||
sed -ri 's|^(APT::Periodic::Update-Package-Lists ")0(";)|\11\2|' "$p"
|
||||
sed -ri 's|^(APT::Periodic::Unattended-Upgrade ")0(";)|\11\2|' "$p"
|
||||
|
||||
#wait 3min after boot to apply the maj
|
||||
for p in "/etc/systemd/system/apt-daily.timer.d" "/etc/systemd/system/apt-daily-upgrade.timer.d"
|
||||
do
|
||||
mkdir "$p"
|
||||
echo "[Timer]\nOnBootSec=3min" > "$p/override.conf"
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "------------------------------------------------------------------------------------"
|
||||
echo ""
|
@ -1,7 +0,0 @@
|
||||
APT::Periodic::Update-Package-Lists "7";
|
||||
APT::Periodic::Download-Upgradeable-Packages "0";
|
||||
APT::Periodic::AutocleanInterval "0";
|
||||
APT::Periodic::MaxAge "30";
|
||||
APT::Periodic::MinAge "2";
|
||||
APT::Periodic::MaxSize "500";
|
||||
APT::Periodic::Unattended-Upgrade "0";
|
Loading…
Reference in New Issue