Asterisk DomU

http://www.panticz.de/DomU-Debian-Wheezy

# hide your ISDN card in dom0 and reboot dom0
# sed -i 's|tty0|tty0 pciback.hide=(04:02.0)|g' /boot/grub/menu.lst
# reboot

# in domU
passwd

# install lspci
apt-get install -y pciutils

# OPTIONAL: Diva Server 4BRI-8M 2.0 PCI
http://www.panticz.de/node/342

# apt-get install -y linux-headers-$(uname -r) dpkg-dev

apt-get source linux-image-$(uname -r)

#cd /usr/src/
#tar xzf linux_2.6.24.orig.tar.gz
#ln -s /usr/src/linux-2.6.24.2/ /usr/src/linux
ln -s /usr/src/linux-$(uname -r)/ /usr/src/linux

#mv /etc/apt/sources.li

UmountMemoryCard.sh

#!/bin/bash

# add to /etc/sudoers
# USER_NAME ALL=NOPASSWD:/bin/umount /media/USER_NAME/usbdisk-sdb1

DEVICE=usbdisk-sdb1

# clean
rm /media/${USER}/${DEVICE}/dcim/100nikon/*.jpg
sync

# umount
sudo /bin/umount /media/${USER}/${DEVICE}

XEN HVM PXE boot domU

# OPTIONAL: create hdd
lvcreate --name pxe-disk --size 4G vg01

# xen config
cat < /etc/xen/pxe
kernel='/usr/lib/xen-default/boot/hvmloader'
builder='hvm'
memory='512'
name='pxe'
device_model='/usr/lib/xen-default/bin/qemu-dm'
boot='nc'
#disk=['phy:/dev/vg01/pxe-disk,ioemu:hda,w']
vnc=1
vncviewer=1
vncpasswd="pxe"
vif=['type=ioemu,bridge=eth0,mac=00:00:aa:bb:44:ae']
usbdevice='tablet'
vnclisten='0.0.0.0'
# vncdisplay=1 # uncomment this line to run on port 5901
EOF

# start domU
xm create pxe

# connect to domU over VNC
vinagre YOUR_DOMU_IP

batteries

#!/bin/bash

http://sourceforge.net/projects/cpupowerd

# load kernel modules
modprobe msr
modprobe powernow-k8
modprobe cpufreq_userspace

# get current cpu state
./cpupowerd -s

# create config
cat < /etc/cpupowerd.conf
1000 0.8500
1800 1.1500
2000 1.1500
2200 1.2000
EOF

# executable
http://dl.panticz.de/sts/cpupowerd.bz2

# test environment
http://dl.panticz.de/sts/cpupowerd_test.tar.bz2

# Links
http://aur.archlinux.org/packages/cpupowerd/cpupowerd/cpupowerd
http://www.meisterkuehler.de/forum/linux-unix/20124-cpupowerd-ein-tool-fuers-cpu-undervolten-unte

ddclient

debconf-set-selections <<\EOF
ddclient ddclient/password: (password omitted)
ddclient ddclient/server: members.dyndns.org
ddclient ddclient/protocol: dyndns2
ddclient ddclient/username: user1
ddclient ddclient/names: myname.dyndns.org
ddclient ddclient/interface: web
ddclient ddclient/service: www.dyndns.com
EOF

# install
apt-get install -y ddclient

# disable demon mode
sed -i 's|run_daemon="true"|run_daemon="false"|g' /etc/default/ddclient

# create cron entry
cat < /etc/cron.hourly/ddclient
#!/bin/sh

HOST=YOUR_HOST.dyndns.org
IP_DNS=\$(ping \${HOST} -c 1 | grep P

Configure Terms and Conditions in Magento (AGBs)

install Market Ready Germany module
http://www.panticz.de/magento_market-ready-germany

Edit condition
Admin Panel > CMS > Static Blocks
click on "AGB"
edit Content
[ Save Block ]

click on "Widerrufsbelehrung"
edit Content
[ Save Block ]

#### OLD ###

# ToDo
# create Terms and Conditions for EVERY language in shop

Create condition
Admin Panel > Sales > Terms and Conditions
[ Add New Condition ]
Terms and Conditions Information
Condition Name: AGBs
Status: Enabled

Create Xen DomU Mailserver

# set domU parameter
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=mx
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:11:22:7E:7E:7E
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=512Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=4Gb

# create domU
##http://www.panticz.de/Xen-domU-ubuntu-jaunty
http://www.panticz.de/DomU-Debian-Wheezy

# add to autostart (optional)
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto

# create lvm for home
lvcreate --name ${DOMAIN_NAME}-home --size 128G vg0
mkfs.ext4 /dev/vg0/${DOMAIN_NAME}-home

# configure domU
vi /etc/xen/${DOMAIN_NAME}
(add)
'phy:/dev/vg0/mx-home,sda3,w'

# post config dom

Install email server (Postfix, Courier, SASL, fetchmail, maildrop, amavisd-new)

# ToDo
# configure antivirus
# configure antispam
# configure secure connections

#
# configure timezone and locale
#
# dpkg-reconfigure tzdata
# locale-gen de_DE

# install Postfix
http://www.panticz.de/Install-Postfix

# install Dovecot
http://www.panticz.de/Install-Dovecot

#
# SASL
#
# install
apt-get install -y sasl2-bin

# post-configure
cp /etc/default/saslauthd /etc/default/saslauthd.$(date -I)
sed -i 's|START=no|START=yes|g' /etc/default/saslauthd
#sed -i 's|OPTIONS="-c -m /var/run/saslauthd"|OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"|g' /etc/defaul

Fileserver (Samba and DHCP)

#!/bin/bash

# set domU name
DOMAIN_NAME=srv

# install vm
xen-create-image --hostname=$DOMAIN_NAME --dhcp --mac=00:11:cc:ab:cd:ef \
--lvm=vg01 --dist=jaunty --mirror=http://archive.ubuntu.com/ubuntu/ --size=4Gb --memory=1Gb --swap=1Gb

# rename config file
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}

# add to autostart
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto

# create lvm for home
lvcreate --name ${DOMAIN_NAME}-media --size 200G vg01
mkfs.ext3 /dev/vg01/${DOMAIN_NAME}-media

# configure domU
vi /etc/xen/${DOMAIN_NAME}
(add)
'phy:/dev/vg01/srv-media,xvda3,