Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- valid=0
- while [ "$valid" != 1 ]; do
- read -p "Install apache / lamp? [y/N]" test
- if [ "$test" = 'y' ] ; then
- read -p "Wait and input any password for mysql [enter]"
- yes | apt-get install lamp-server^
- valid=1
- elif [ "$test" = 'n' ] || [ -z "$test" ]; then
- valid=1
- fi
- done
- valid=0
- while [ "$valid" != 1 ]; do
- read -p "Install git? [y/N]" test
- if [ "$test" = 'y' ]; then
- yes | apt-get install git;
- valid=1
- elif [ "$test" = 'n' ] || [ -z "$test" ]; then
- valid=1
- fi
- done
- valid=0
- while [ "$valid" != 1 ]; do
- read -p "Install gcc? [y/N]" test
- if [ "$test" = 'y' ]; then
- yes | apt-get install gcc
- valid=1
- elif [ "$test" = 'n' ] || [ -z "$test" ]; then
- valid=1
- fi
- done
- valid=0
- while [ "$valid" != 1 ]; do
- read -p "Install php-sqlite? [Y/n]" test
- if [ "$test" = 'y' ] || [ -z "$test" ]; then
- yes | apt-get install php5-sqlite
- valid=1
- elif [ "$test" = 'n' ]; then
- valid=1
- fi
- done
- valid=0
- read -p "Server root? [/var/www]: " root
- if [ -z "$root" ]; then
- root="/var/www"
- fi
- cd $root
- if [ -f "index.html" ]; then
- rm index.html
- fi
- while [ "$valid" != 1 ]; do
- read -p "Checkout (update) code? [Y/n]" test
- if [ $test = 'y' ] || [ -z $test ]; then
- rm -rf *
- git clone https://github.com/S0lll0s/pReProx.git .
- valid=1
- elif [ $test = 'n' ]; then
- valid=1
- fi
- done
- valid=0
- chmod 777 *
- chmod 777 .
- echo "ServerRoot $root" > /etc/apache2/httpd.conf
- /etc/init.d/apache2 restart
- gcc -o newredir newredir.c
- chmod u+s newredir
- sudo chmod 6755 newredir
- read -p "Please change the settings in config.php [enter]"
- vi /var/www/config.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement