$ sudo apt-get install unattended-upgrades
$ sudo nano /etc/apt/apt.conf.d/10periodic
#!/bin/bash | |
# Copyright (C) 2012 Vít Šesták <v6ak.com> | |
# This program is free software. It comes without any warranty, to | |
# the extent permitted by applicable law. You can redistribute it | |
# and/or modify it under the terms of the Do What The Fuck You Want | |
# To Public License, Version 2, as published by Sam Hocevar. See | |
# http://www.wtfpl.net/ for more details. | |
# This utility notifies about completed messages of Task spooler (see http://viric.name/soft/ts/). | |
# Just add the path to this utility to $TS_ONFINISH. |
#!/bin/sh | |
BASEFOLDER=/home/vbox/backups | |
for VMNAME in $(VBoxManage list runningvms | cut -d ' ' -f1 | sed 's/"//g;') | |
do | |
echo "" | |
VBoxManage controlvm "$VMNAME" acpipowerbutton | |
echo "Waiting for VM "$VMNAME" to poweroff..." | |
until $(VBoxManage showvminfo --machinereadable "$VMNAME" | grep -q ^VMState=.poweroff.) |