uploading installation script

pull/576/head
drapl0n 2022-12-25 22:58:52 +05:30 committed by GitHub
parent f58f965204
commit 5a7da24f95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#!/bin/bash
apt update
apt install nginx php5 php5-fpm php5-cgi -y
rm /etc/nginx/nginx.conf /etc/nginx/sites-enabled/default /etc/nginx/sites-available/default
cp nginx/default /etc/nginx/sites-available/ && cp nginx/enabled-default /etc/nginx/sites-enabled/default && cp nginx/nginx.conf /etc/nginx/ && cp -rv sites/ /var/www/html/
udisk mount
read -p "Select switch to copy payload in [1|2]: " choice
if [ "$choice" = 1 ]; then
cp payload.txt /root/udisk/payloads/switch1
elif [ "$choice" = 2 ]; then
cp payload.txt /root/udisk/payloads/switch2
else
echo -e "Invalid input $choice ."
exit 1
fi
udisk umount
chown -R www-data:www-data /var/www/html/sites
echo -e "\nInstallation completed successfully."