Update install.sh

This commit is contained in:
Erreur32 2017-07-21 01:25:35 +02:00
parent 1d18a9a018
commit e22ffac1ac

View file

@ -72,8 +72,7 @@ then
echo "cat /etc/motd" >> /root/.bashrc echo "cat /etc/motd" >> /root/.bashrc
echo -e "\e[92m Code bash added.\e[0m" echo -e "\e[92m Code bash added.\e[0m"
else else
echo "Code bash found" echo "Code bash found" ; grep '/etc/motd' /root/.bashrc
grep '/etc/motd' /root/.bashrc
#sed -i '/cat \/etc\/motd/d' /root/.bashrc #sed -i '/cat \/etc\/motd/d' /root/.bashrc
#echo -e "\e[92m Code .bashrc remove.\e[0m" #echo -e "\e[92m Code .bashrc remove.\e[0m"
fi fi
@ -101,7 +100,7 @@ if [ -f /usr/bin/motd ]
fi fi
echo -e " -->\e[34m Copy files OK\n" echo -e " -->\e[34m Copy files OK\n"
echo -ne '\e[0m######### (50%)\r' echo -ne '\e[0m#########(50%)\r'
sleep 1 sleep 1
echo -ne "\n" echo -ne "\n"
echo -e "\nDo you wish to install the required package?\n \e[0m --> apt-get install ntp figlet ? (y/n) " echo -e "\nDo you wish to install the required package?\n \e[0m --> apt-get install ntp figlet ? (y/n) "
@ -110,17 +109,17 @@ stty raw -echo
answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done ) answer=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done )
stty $old_stty_cfg stty $old_stty_cfg
if echo "$answer" | grep -iq "^y" ;then if echo "$answer" | grep -iq "^y" ;then
echo -e "\n\e[34m1.\e[92m apt-get install \e[0m ntp figlet \e[94m start\e[0m\n" ; apt-get install -y ntp figlet; echo -e "\n\e[92m apt-get install \e[0m ntp figlet \e[94m start\e[0m\n" ; apt-get install -y ntp figlet;
echo -e "\n\e[92mapt-get installation\e[0m Succesfull" echo -e "\n\e[92mapt-get installation\e[0m Succesfull"
if [ -f /usr/bin/motds32 ] if [ -f /usr/bin/motds32 ]
then then
echo -e "\nMake file done.\n" echo -e "\n\e[92m Make file done.\n"
else else
make install make install
echo -e "\nMake file done.\n" echo -e "\n\e[92m Make file done.\n"
fi fi
else else
echo -e "\nDo you want to continue this installation? (y/n)\n " echo -e "\n\e[34mDo you want to continue this installation? (y/n)\n "
old2_stty_cfg=$(stty -g) old2_stty_cfg=$(stty -g)
stty raw -echo stty raw -echo
answer2=$( while ! head -c 2 | grep -i '[ny]' ;do true ;done ) answer2=$( while ! head -c 2 | grep -i '[ny]' ;do true ;done )
@ -159,7 +158,7 @@ fi
## Generate first stats ## Generate first stats
/usr/bin/motds32 -g /usr/bin/motds32 -g
echo -ne '\n\e[0m####################### (100%)\r\n\n' echo -ne '\n\e[0m#######################(100%)\r\n\n'
echo -e "\n\e[34m \e[92m completed!\e[0m \n\nUse: /usr/bin/motds32 for help\n" echo -e "\n\e[34m \e[92m completed!\e[0m \n\nUse: /usr/bin/motds32 for help\n"
exit 0 exit 0