1
1
Fork 0

cleaned up repository

This commit is contained in:
David Starzengruber 2011-05-30 00:55:14 +02:00
parent 3184ae2877
commit e244122f8f
5 changed files with 0 additions and 97 deletions

View File

@ -1,25 +0,0 @@
## ars electronica maintainence cron job script
## vars
logfile="/var/log/aec_cron.log"
hostname=$(hostname)
## print timestamp
timestamp=$(date +"%d.%m.%Y %R")
echo >> $logfile
echo "##### aec cron script ## $timestamp ## $hostname #####" >> $logfile
## local package updates
echo "updating package sources"
#apt-get update &> /dev/null
#apt-get upgrade -y >> $logfile
## local backups
#call backupscripts
## tell my ip

View File

@ -1,58 +0,0 @@
#!/bin/bash
if [ $(whoami) = "root" ]; then
:
else
echo "only root can do this"
exit 1
fi
echo "hostname?"
read hostname
echo "username?"
read username
echo "architecture? [amd64]"
read arch
echo "disksize? [8]"
read disksize
if [ -z $disksize ]; then
disksize=8192
else
disksize=$((disksize*1024))
fi
if [ -z $arch ]; then
arch="amd64"
fi
clear
echo
echo "a virtual machine with following details will be created in $(pwd)"
echo
echo "hostname: $hostname"
echo "os: lucid lynx"
echo "architecture: $arch"
echo "disksize: $disksize"
echo "password: password"
echo "proceed? [yes]"
read proceed
if [ -z $proceed ]; then
proceed="yes"
fi
if [ $proceed = "yes" ]; then
:
else
exit 1
fi
ubuntu-vm-builder kvm lucid --arch "$arch" --mem '512' --rootsize "$disksize" --swapsize '1024' --kernel-flavour 'virtual' --hostname "$hostname" --domain 'socialnerds.org' --mirror 'http://roxy.socialnerds.org/ubuntu' --components 'main,restricted,universe,multiverse' --addpkg "ssh" --name 'creator' --user "$username" --pass 'password'
echo
echo "creation finished"
exit 0

View File

@ -1,14 +0,0 @@
#!/bin/bash
# generating new ids for a vm
newuuid=$(uuidgen)
newmac=$(MACADDR="52:54:$(dd if=/dev/urandom count=1 2>/dev/null | md5sum | sed 's/^\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4/')"; echo $MACADDR)
# printing new ids
#clear
echo
echo "UUID: $newuuid"
echo "MAC: $newmac"
echo
exit 0