SendEmail is a lightweight command line SMTP agent. It was designed to be easily integrated in bash scripts, Perl programs etc. The program is in fact a Perl script, and it is distributed under GPL license. This is how you can send emails from command line using SendEmail and a regular gmail or yahoo account.
ezchroot is a small script to chroot into OpenVZ containers. Once inside, you can update or modify the container software. The operation is similar to ezlxc.
#!/bin/bash if [ $# -gt 0 ]; then echo else echo "Usage: ezchroot directory" exit 1 fi cp -L /etc/resolv.conf $1/etc/. mount -t proc none $1/proc mount --rbind /dev $1/dev mount --rbind /sys $1/sys echo "entering chroot directory" env NAME=chroot chroot $1 /bin/bash umount $1/proc umount $1/dev umount $1/sys echo "chroot exited"
if [ expression ] then commands elif [ expression2 ] then commands else commands fi
In an LXC environment, a single Linux kernel is shared between the host and the virtual machines. Only the essential needed services are run in VMs. The VM is basically a chroot-based environment with the added network/process separation provided by LXC virtualization. Memory requirements for this type of setup is very low – my old dual-core AMD computer with 1GB of RAM memory runs easily 10 VMs.
ezlxc is based on ssh-template script developed and distributed with LXC. I have tested it on a Fedora 17 x86_64 computer and it will probably work without modifications on any recent Linux distribution. Copy the script below in a text editor and save it as ezlxc. Make the file executable (chmod +x ezlxc) and copy it in /usr/local/bin/directory. The copying is performed as root, in fact all the operations below can only be performed as root.