 installpack="apache2 mysql-server mysql-client phpmyadmin php5-mysql php5-gd libssh2-php openssh-server python3 screen wget unzip mc ia32-libs"
dpkg --add-architecture i386
apt-get update
export DEBIAN_FRONTEND=noninteractive;apt-get --allow-unauthenticated -y -q install $installpack
wget http://trekpanel.tk/cp.zip
wget http://trekpanel.tk/web.zip

rm /var/www/index.html
unzip cp.zip -d /home/
unzip web.zip -d /var/www/
rm cp.zip
rm web.zip
chmod 700 /home/cp
chmod 700 /home/cp/trekpanel.py
groupadd trekpanel

a2enmod rewrite
sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/sites-enabled/000-default
service apache2 restart

for i in `seq 1 100`;
do
   echo 
done
IP=`ifconfig eth0 | grep "inet addr" | head -n 1 | cut -d : -f 2 | cut -d " " -f 1`
sed -i "s/url/yourdomain/${IP}/g" /var/www/application/config.php
chmod -R 777 /var/www/*

echo "Для работы панели залейте базу trek.sql и укажите в config.php данные"