piframe/docs/auto_updates.md

1012 B

Automatic Updates

The below will setup nightly automatic update and reboots for the PiFrame. This is a really smart choice as it will ensure security updates are applied in a timely fashion.


apt install unattended-upgrades
nano -w /etc/apt/apt.conf.d/10periodic
APT::Periodic::AutocleanInterval "1";
APT::Periodic::CleanInterval "1";
nano -w /etc/apt/apt.conf.d/50unattended-upgrades
    Unattended-Upgrade::Mail "user@domain.tld";
    Unattended-Upgrade::Automatic-Reboot "true";
    Unattended-Upgrade::Automatic-Reboot-WithUsers "true";
    Unattended-Upgrade::Automatic-Reboot-Time "02:00";
nano -w /etc/apt/apt.conf.d/20auto-upgrades
unattended-upgrades --dry-run --debug
cat > /usr/local/bin/3rd_party_app_updates.sh <<EOF
#!/bin/bash
curl -fsSL https://filebrowser.org/get.sh | bash
restic self-update
curl https://rclone.org/install.sh | bash
EOF
chmod a+x /usr/local/bin/3rd_party_app_updates.sh
crontab -e
0 7 14 * * /usr/local/bin/3rd_party_app_updates.sh