#!/bin/sh #----------------------------------------------------------------------------- # /var/install/bin/openvz-get-templates - download VM templates # # Last Update: $Id:$ # # Copyright (c) 2006-2009 the eisfair team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #----------------------------------------------------------------------------- #exec 2> /tmp/openvz-create-vm$$.log #set -x while read line do case "X$line" in X#*) echo "$line" ;; *) cd /var/lib/vz/template if wget -c --follow-ftp $line then mv -f /var/lib/vz/template/*.tar.* /var/lib/vz/template/cache fi ;; esac done < /var/lib/vz/template/templates.url