connectToVPN.sh

#!/bin/bash
 
# get current dir
DIR=${0%/*}
 
# read host list from file
HOSTS=$(cd $DIR; ls) 
 
# get host ip
VPN=$(zenity --list --height 400 --column "Name" ${HOSTS})
 
# check if chosen dir exists
if [ !

Install osCommerce

wget http://www.oscommerce.com/ext/oscommerce-2.2rc2a.zip
 
unzip oscommerce-2.2rc2a.zip
 
cd oscommerce-2.2rc2a
 
chmod 777 catalog/includes/configure.php
chmod 777 catalog/admin/includes/configure.php
 
apt-get install php5-curl
 
# create db
mysql -u root -p 
create database oscommerce;
CREATE USER oscommerce IDENTIFIED BY 'PASS';
grant all on oscommerce.* to 'oscommerce'@'%' identified by "PASS";
commit;
quit;
 
http://YOUR_SERVER/oscommerce-2.2rc2a/catalog/install/install.php
 
rm -r catalog/install/
 
chmod a-wx catalog/includes/configure.php
 
http://YOUR_SERVER/oscommer

Install VLC player

wget https://raw.githubusercontent.com/panticz/installit/master/install.vlc.sh -O - | bash -

#!/bin/bash

if [ "$1" == "-n" ]; then
  sudo add-apt-repository -y ppa:videolan/stable-daily
  sudo apt-get update
fi

sudo apt-get install -y vlc
sudo apt-get install -y vlc-plugin-pulse
sudo apt-get install -y browser-plugin-vlc

# set vnc as default media player
sudo sed -i 's|totem.desktop|vlc.desktop|g' /etc/gnome/defaults.list

Etope-O-Mat.sh

#!/bin/bash
 
# get image name
if [ -z $1 ]; then
	# read from dialog
	INPUT=$(zenity --title  "Etope-O-Mat" --entry --text "Bildname:")
else
	# copy input from command line
	INPUT=$@
fi
 
for IMAGE in $INPUT; do
	# convert image name to lower case
	IMAGE=$(echo ${IMAGE} | tr "[:upper:]" "[:lower:]")
 
	# add .jpg file extension if not already exists
	IMAGE="${IMAGE/.jpg}.jpg"
 
	# set input and output
	PATH_IN=/media/bilder/300dpi
	PATH_OUT=/home/$USER/200px
	FILE_IN="${PATH_IN}/${IMAGE}"
	FILE_OUT="${PATH_OUT}/${IMAGE}"
 
	# check dirs
	[ !

GeeXbox USB boot (GeeXbox Live CD boot from USB)

#!/bin/bash
 
apt-get install syslinux mbr
 
# optionaly
# mkfs.vfat -n RALLY2 /dev/sdb1
 
install-mbr /dev/sdb
syslinux -f /dev/sdb1
 
sudo mount geexbox-devel-20080507-en.i386.iso /mnt/ -o loop
cp -a /mnt/GEEXBOX/ /media/RALLY2/
sudo umount /mnt
 
cat <<EOF>> /media/RALLY2/syslinux.cfg
LABEL geexbox_hdtv
MENU LABEL Start GeeXboX for HDTV ...
KERNEL /GEEXBOX/boot/vmlinuz
APPEND initrd=/GEEXBOX/boot/initrd.gz root=/dev/ram0 rw rdinit=linuxrc boot=sdb1 lang=en remote=atiusb receiver=atiusb keymap=qwerty splash=silent vga=789 video=vesafb:ywrap,mtrr hdtv
 
LABEL geexbox_hdtv_de

HP Evo T20 as LTSP client under Ubuntu Hardy

# configure LTSP
vi /var/lib/tftpboot/ltsp/i386/lts.conf
[default]
LDM_DIRECTX=True
SOUND=N
XSERVER=nsc
X_COLOR_DEPTH=16
X_HORZSYNC=48.4-60.5
X_VERTREFRESH=60-75
 
# configure boot parameter
vi /var/lib/tftpboot/ltsp/i386/pxelinux.cfg/default
DEFAULT vmlinuz ro initrd=initrd.img quiet splash pnpbios=off
 
# disable nic messages
cat <<EOF> /opt/ltsp/i386/etc/init.d/disableNicMsg
#!/bin/bash
/usr/sbin/ethtool -s eth0 msglvl 0
exit 0
EOF
 
chmod 755 /opt/ltsp/i386/etc/init.d/disableNicMsg
cd /opt/ltsp/i386/etc/rcS.d/
ln -s ../init.d/disableNicMsg S20disableNicMsg
 
# update

RaLink RT2500 (rt2500pci)

# fix driver / config bug in Ubuntu Hardy (low bandwidth)
iwconfig wlan0 rate 54M
 
# run automaticly on startup
cat <<EOF> /etc/rc.local
#!/bin/sh -e
iwconfig wlan0 rate 54M
exit 0
EOF
 
# Links
http://wiki.ubuntuusers.de/WLAN/Ralink

Create XEN Torrent Domain

DOMAIN_NAME=torrent
 
xen-create-image --hostname=$DOMAIN_NAME --ip=192.168.1.123 --gateway=192.168.1.5 --netmask=255.255.255.0 \
--dir=/home/xen --dist=hardy --mirror=http://archive.ubuntu.com/ubuntu/ \
--size=4Gb --memory=128Mb --swap=128Mb
 
sed -i 's|file:|tap:aio:|g' /etc/xen/$DOMAIN_NAME.cfg
mv /etc/xen/$DOMAIN_NAME.cfg /etc/xen/$DOMAIN_NAME
 
apt-get install -y wget rtorrent
 
cat <<EOF>> ~/.rtorrent.rc 
upload_rate = 16
port_range = 7000-7200
EOF
 
# todo
mount /home/xen/domains/$DOMAIN_NAME/disk.img /mnt -o loop
chroot /mnt
 
umount /mnt/
 
 
 
cat ~/.rtorrent.rc 
up

Ubuntu USB boot (Ubuntu Live CD boot from USB)

#!/bin/bash
 
DEVICE=/dev/sdb
ISO=ubuntu-16.10-desktop-amd64.iso
VOLUME=BOOTUSB
 
# install needed apps
sudo apt-get install -y syslinux mbr mtools dosfstools
 
# OPTIONALY format drive 
# sudo umount ${DEVICE}1
# sudo mkfs.vfat -n ${VOLUME} ${DEVICE}1
 
# install mbr and syslinux
mkdir /tmp/${VOLUME}
sudo mount ${DEVICE}1 /tmp/${VOLUME}
sudo install-mbr ${DEVICE}
 
sudo mkdir /tmp/${VOLUME}/boot
sudo syslinux -f ${DEVICE}1 -d boot
#sudo syslinux -f ${DEVICE}1
#sudo syslinux -smf ${DEVICE}1
 
sudo cp /usr/lib/syslinux/modules/bios/vesamenu.c32 /tmp/${VOLUME}/boot/
 
sudo mkdi

Create XEN Hylafax domain

# redirect your ISDN card on dom0
http://www.panticz.de/xen_pci_delegation
 
# set domU parameter
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=fax
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:00:00:00:fa:fa
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=256Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=2Gb
[ -z $DOMAIN_PCI ] && DOMAIN_PCI=04:05.0
 
# create domU
http://www.panticz.de/DomU-Debian-Squeeze
 
# redirect avm usb card
echo "pci=['${DOMAIN_PCI}']" >> /etc/xen/${DOMAIN_NAME}
echo "extra = 'iommu=soft'" >> /etc/xen/${DOMAIN_NAME}
 
# start domU
xm create -c ${DOMAIN_NAME}
 
# install AVM FRITZ!Card PCI kernel moud
Syndicate content