#!/bin/bash # Unattended upgrades installation on Raspbian # # Copyleft 2017 by Ignacio Nunez Hernanz # GPL licensed (see end of file) * Use at your own risk! # # Usage: # # ./installer.sh unattended-upgrades.sh () # # See installer.sh instructions for details # More at: ownyourbits.com # ACTIVE_=yes AUTOREBOOT_=yes DESCRIPTION="Automatic installation of security updates. Keep your cloud safe" install() { apt-get update apt install -y --no-install-recommends unattended-upgrades rm /etc/apt/apt.conf.d/20auto-upgrades } configure() { [[ $ACTIVE_ == "yes" ]] && local AUTOUPGRADE=1 || local AUTOUPGRADE=0 [[ $AUTOREBOOT_ == "yes" ]] && local AUTOREBOOT=true || local AUTOREBOOT=false # It seems like the label Raspbian-Security does not work for Raspbian # See https://www.raspberrypi.org/forums/viewtopic.php?t=82863&p=585739 cat > /etc/apt/apt.conf.d/20nextcloudpi-upgrades <