#!/bin/bash
links="http://http://www.xuanlove.download/kengle"
files="/root/s-hell"
file2="/root/s-hell/log"
file3="/root/hl-tmp"
echo "Mkdiring>>>>>>>>>>"
cd
echo "Mkdiring For Config A Folde >>>>>>>>>>"
rm -rf hls*
echo "Mkdiring For Config B Folde >>>>>>>>>>"
echo -e "nameserver 114.114.114.114\nnameserver 8.8.8.8" >> /etc/resolv.conf
echo "Mkdiring For New file >>>>>>>>>>"
if [ ! -d "$files" -a "$file2" -a "$file3" ];
echo "Mkdir Is OK!"
then
mkdir $files;
chmod 755 $files;
mkdir $file2;
chmod 755 $file2;
mkdir $file3;
chmod 755 $file3;
fi
echo "Error>>>>>>>>>>"
echo "File Exists"
cd $file3
echo "Download Config File >>>>>>>>>>"
echo "-                              [01%]"
echo "=-                             [05%]"
echo "==-                            [10%]"
echo "===-                           [15%]"
echo "====-                          [20%]"
echo "=====-                         [25%]"
echo "======-                        [30%]"
rm -rf $files/config
echo "=======-                       [35%]"
echo "========-                      [40%]"
echo "=========-                     [45%]"
wget -q $links/config -O $files/config
echo "===========-                   [50%]"
echo "=============-                 [55%]"
echo "==============-                [60%]"
wget -q $links/main.sh -O main.sh
echo "=================-             [65%]"
echo "===================-           [70%]"
echo "=====================-         [75%]"
echo "=======================-       [80%]"
echo "=========================-     [85%]"
echo "============================-  [90%]"
cp main.sh /usr/bin/hls
chmod 777 /usr/bin/hls
echo "=============================- [95%]"
echo "==============================[100%]"
sh main.sh
