mirror of
https://github.com/EvgenyNerush/easy-xray.git
synced 2025-02-02 00:20:58 +03:00
ask about cdn
This commit is contained in:
parent
480dde97f4
commit
7f4cb2710e
1 changed files with 22 additions and 10 deletions
32
ex.sh
32
ex.sh
|
@ -511,16 +511,28 @@ sudo ./ex.sh install${normal}"
|
|||
echo -e "${red}customgeo.dat not copied to ${dat_dir}${normal}"
|
||||
exit 1
|
||||
fi
|
||||
# for cert.pem
|
||||
mkdir -p /etc/ssl/certs/
|
||||
# for cert.key
|
||||
mkdir -p /etc/ssl/private/
|
||||
# for nginx's 'site'
|
||||
mkdir -p /etc/nginx/sites-enabled/
|
||||
#
|
||||
cp -b ./cert.pem /etc/ssl/certs/
|
||||
cp -b ./cert.key /etc/ssl/private/
|
||||
cp -b ./nginx.conf /etc/nginx/nginx.conf
|
||||
echo -e "Make CDN support? (y/N)"
|
||||
read answer
|
||||
if [ ! -v $answer ] && ([ ${answer::1} = "y" ] || [ ${answer::1} = "Y" ])
|
||||
then
|
||||
if [ -f "cert.pem" ] && [ -f "cert.key" ] && [ -f "nginx.conf" ]
|
||||
then
|
||||
# for cert.pem
|
||||
mkdir -p /etc/ssl/certs/
|
||||
# for cert.key
|
||||
mkdir -p /etc/ssl/private/
|
||||
# for nginx's 'site'
|
||||
mkdir -p /etc/nginx/sites-enabled/
|
||||
#
|
||||
cp -b ./cert.pem /etc/ssl/certs/
|
||||
cp -b ./cert.key /etc/ssl/private/
|
||||
cp -b ./nginx.conf /etc/nginx/nginx.conf
|
||||
systemctl enable nginx
|
||||
else
|
||||
echo -e "${red}no Cloudflare certificates cert.* or no nginx.conf found, aborting${normal}"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo -e "${red}xray not installed, something goes wrong${normal}"
|
||||
exit 1
|
||||
|
|
Loading…
Add table
Reference in a new issue