fixing gay shitz
This commit is contained in:
parent
eb1dc859ac
commit
3863bc39c2
41
installer.sh
41
installer.sh
|
@ -17,37 +17,46 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Install the 'webrick' gem
|
||||
# install ruby dep dep webriccc
|
||||
if ! gem list webrick -i > /dev/null; then
|
||||
echo "Installing webrick..."
|
||||
gem install webrick
|
||||
fi
|
||||
|
||||
|
||||
echo "Enabling Nginx service..."
|
||||
echo "enablin dat nginx and starting dat mf"
|
||||
sudo systemctl enable nginx
|
||||
sudo systemctl start nginx
|
||||
|
||||
# Make a directory in the current user's home folder called 'ruby-proxy'
|
||||
if [ ! -d ~/ruby-proxy ]; then
|
||||
echo "Creating directory 'ruby-proxy'..."
|
||||
if [ -d ~/ruby-proxy ]; then
|
||||
echo "gurl that directory already exists you wanna delete it?"
|
||||
read -p "you wanna yeetus feetus deletus? y/n " answer
|
||||
if [ "$answer" == "y" ]; then
|
||||
echo "deleting your life jk jk deleting the directory"
|
||||
rm -rf ~/ruby-proxy
|
||||
else
|
||||
echo "go bad bitch i guess"
|
||||
exit
|
||||
fi
|
||||
else
|
||||
echo "creating da directory ruby-proxy"
|
||||
mkdir ~/ruby-proxy
|
||||
fi
|
||||
|
||||
# Clone the contents of the specified git repository into that folder
|
||||
|
||||
# clone program git into fodler ... maybe add option to skip this lol
|
||||
if [ ! -d ~/ruby-proxy/ruby-rewrite-proxy ]; then
|
||||
echo "Cloning repository..."
|
||||
echo "commiting piracy and downloading da hackz"
|
||||
git clone https://adastra7.net/git/crt/ruby-rewrite-proxy.git ~/ruby-proxy
|
||||
fi
|
||||
|
||||
# Ask the user to set server_name and proxy_set_header
|
||||
read -p "Enter server_name (the URL from which you will access the Website): " server_name
|
||||
read -p "Enter proxy_set_header (the host header for the website you wanna modify/proxy): " proxy_set_header
|
||||
# goofy ah ask user to set nginx proxy stuff
|
||||
read -p "Enter the sexy server_name (the URL from which you will access the Website): " server_name
|
||||
|
||||
# Create the Nginx config file
|
||||
if [ ! -f /etc/nginx/sites-available/ruby-proxy ]; then
|
||||
echo "Creating Nginx configuration file..."
|
||||
sudo cat << EOF > /etc/nginx/sites-available/ruby-proxy
|
||||
echo "breaking nginx cutely"
|
||||
sudo tee /etc/nginx/sites-available/ruby-proxy > /dev/null <<EOF
|
||||
resolver 8.8.8.8;
|
||||
|
||||
server {
|
||||
|
@ -56,7 +65,7 @@ server {
|
|||
|
||||
location / {
|
||||
proxy_pass http://localhost:8000/;
|
||||
proxy_set_header Host $proxy_set_header;
|
||||
proxy_set_header Host \$host;
|
||||
proxy_set_header X-Real-IP \$remote_addr;
|
||||
proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for;
|
||||
proxy_ssl_server_name on;
|
||||
|
@ -78,15 +87,15 @@ server {
|
|||
EOF
|
||||
fi
|
||||
|
||||
# Enable the site
|
||||
# enable the disfunction of being braindead i wanna die die die
|
||||
if [ ! -f /etc/nginx/sites-enabled/ruby-proxy ]; then
|
||||
echo "Enabling the site..."
|
||||
sudo ln -s /etc/nginx/sites-available/ruby-proxy /etc/nginx/sites-enabled/
|
||||
fi
|
||||
|
||||
# Reload Nginx to apply the changes
|
||||
echo "Reloading Nginx..."
|
||||
echo "seeing if nginx breaks"
|
||||
sudo systemctl reload nginx
|
||||
|
||||
echo "The script has completed. Please edit the config.yml in ~/ruby-proxy/config.yml to your liking now before running proxy.rb to start the proxy"
|
||||
echo "The script has completed. Please commit arson on tbz now"
|
||||
|
||||
|
|
Loading…
Reference in New Issue