Update install.sh
This commit is contained in:
parent
ced8888cc0
commit
1d18a9a018
1 changed files with 11 additions and 11 deletions
22
install.sh
22
install.sh
|
@ -70,16 +70,16 @@ if [ `grep -c /etc/motd /root/.bashrc` == 0 ]
|
||||||
then
|
then
|
||||||
echo "code bash missing\n"
|
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"
|
echo -e "\e[92m Code bash added.\e[0m"
|
||||||
else
|
else
|
||||||
echo "ligne trouvee"
|
echo "Code bash found"
|
||||||
grep -n '/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
|
||||||
echo -ne '## (10%)\r'
|
echo -ne '\e[0m## (10%)\r'
|
||||||
sleep 1
|
sleep 1
|
||||||
echo -ne "\n"
|
echo -e "\n\n"
|
||||||
## Insdtall modules
|
## Insdtall modules
|
||||||
|
|
||||||
if [ -f "/etc/motds32/Stats32" ]
|
if [ -f "/etc/motds32/Stats32" ]
|
||||||
|
@ -101,7 +101,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 '######### (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) "
|
||||||
|
@ -126,21 +126,21 @@ 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 )
|
||||||
stty $old2_stty_cfg
|
stty $old2_stty_cfg
|
||||||
if echo "$answer2" | grep -iq "^y" ;then
|
if echo "$answer2" | grep -iq "^y" ;then
|
||||||
echo -e "\n\e[34m1.\e[92m No apt-get required\e[0m Installation continue... \n"; make install
|
echo -e "\n\e[92m No apt-get required\e[0m Installation continue... \n"; make install
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -ne '##################(90%)\r'
|
echo -ne '\e[0m##################(90%)\r'
|
||||||
sleep 1
|
sleep 1
|
||||||
echo -e "\n"
|
echo -e "\n"
|
||||||
## Install Crontab
|
## Install Crontab
|
||||||
|
|
||||||
if crontab -l | grep -q '/usr/bin/motds32'; then
|
if crontab -l | grep -q '/usr/bin/motds32'; then
|
||||||
echo -e "\e[34m2.\e[92m Cron already added."
|
echo -e "\e[92m Cron already added."
|
||||||
else
|
else
|
||||||
echo -e "\e[34m2.\e[92m Cron added."
|
echo -e "\e[92m Cron added."
|
||||||
(crontab -l ; echo "*/5 * * * * root /usr/bin/motds32 -g 2>1")| crontab -
|
(crontab -l ; echo "*/5 * * * * root /usr/bin/motds32 -g 2>1")| crontab -
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ fi
|
||||||
## Generate first stats
|
## Generate first stats
|
||||||
/usr/bin/motds32 -g
|
/usr/bin/motds32 -g
|
||||||
|
|
||||||
echo -ne '####################### (100%)\r\n\n'
|
echo -ne '\n\e[0m####################### (100%)\r\n\n'
|
||||||
echo -e "\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\nUse: /usr/bin/motds32 for help\n"
|
echo -e "\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\nUse: /usr/bin/motds32 for help\n"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue