#!/bin/bash
# installeert unattended-upgrades in Jessie

apt-get install unattended-upgrades
if ! test $? = 0; then echo "niet gelukt"; exit; fi
cd /tmp
wget vandervlis.nl/files/10periodic
wget vandervlis.nl/files/50unattended-upgrades
mv 10periodic /etc/apt/apt.conf.d/
mv 50unattended-upgrades /etc/apt/apt.conf.d/
unattended-upgrade --debug --dry-run

# flash
wget vandervlis.nl/files/flash-update
mv flash-update /etc/cron.d/
chmod 644 /etc/cron.d/flash-update
