Update install.sh

This commit is contained in:
Erreur32 2017-07-21 01:09:00 +02:00
parent a3ae0cb68b
commit 5eadb0e038

View file

@ -63,7 +63,22 @@ fi
echo -e "\n\e[34mInstallation of in progress... \e[0m" echo -e "\n\e[34mInstallation of in progress... \e[0m"
## Install command in bashrc ## Install command in bashrc
echo -ne '##### (33%)\r'
sleep 1
if [ `grep -c /etc/motd /root/.bashrc` == 0 ]
then
echo "code bash missing\n"
echo "cat /etc/motd" >> /root/.bashrc echo "cat /etc/motd" >> /root/.bashrc
echo -e "\e[92m Code .bashrc added.\e[0m"
else
echo "ligne trouvee"
grep -n '/etc/motd' /root/.bashrc
#sed -i '/cat \/etc\/motd/d' /root/.bashrc
#echo -e "\e[92m Code .bashrc remove.\e[0m"
fi
echo -ne '######### (50%)\r'
sleep 1
## Insdtall modules ## Insdtall modules
@ -83,7 +98,7 @@ if [ -f /usr/bin/motd ]
ln -s /usr/bin/motds32 /usr/bin/motd ln -s /usr/bin/motds32 /usr/bin/motd
fi fi
echo -ne '############ (65%)\r'
echo -e " -->\e[34m Copy files OK\n" echo -e " -->\e[34m Copy files OK\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) "
old_stty_cfg=$(stty -g) old_stty_cfg=$(stty -g)
@ -112,7 +127,7 @@ stty $old2_stty_cfg
exit 1 exit 1
fi fi
fi fi
echo -ne '################ (80%)\r'
## Install Crontab ## Install Crontab
if crontab -l | grep -q '/usr/bin/motds32'; then if crontab -l | grep -q '/usr/bin/motds32'; then
@ -136,7 +151,7 @@ fi
## Generate first stats ## Generate first stats
/usr/bin/motds32 -g /usr/bin/motds32 -g
echo -ne '####################### (100%)\r'
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