Update install.sh
This commit is contained in:
parent
97a2e110bc
commit
97bb3bc4d1
1 changed files with 13 additions and 8 deletions
19
install.sh
19
install.sh
|
@ -84,18 +84,23 @@ if [ -f /usr/bin/motd ]
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n -->\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)
|
||||||
stty raw -echo
|
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 "\n1.\e[92m apt-get install \e[0m ntp figlet \e[94m start\e[0m" ; apt-get install -y ntp figlet;
|
echo -e "\n\e[34m1.\e[92m apt-get install \e[0m ntp figlet \e[94m start\e[0m" ; 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"
|
||||||
echo -e "\n Installation of MOTDs32\n"
|
echo -e "\n Installation of MOTDs32\n"
|
||||||
|
if [ -f /usr/bin/motds32 ]
|
||||||
|
then
|
||||||
|
echo -e "\nMake file done.\n"
|
||||||
|
else
|
||||||
make install
|
make install
|
||||||
echo -e "\n Installation done, next.\e[92m OK"
|
fi
|
||||||
|
echo -e "\nMake file done.\n"
|
||||||
else
|
else
|
||||||
echo -e "\nDo you want to continue this installation? (y/n)\n "
|
echo -e "\nDo you want to continue this installation? (y/n)\n "
|
||||||
old2_stty_cfg=$(stty -g)
|
old2_stty_cfg=$(stty -g)
|
||||||
|
@ -103,7 +108,7 @@ 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 "\n1.\e[92m No apt-get required\e[0m Installation continue... \n"; #make install
|
echo -e "\n\e[34m1.\e[92m No apt-get required\e[0m Installation continue... \n"; make install
|
||||||
else
|
else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -112,9 +117,9 @@ fi
|
||||||
## Install Crontab
|
## Install Crontab
|
||||||
|
|
||||||
if crontab -l | grep -q '/usr/bin/motds32'; then
|
if crontab -l | grep -q '/usr/bin/motds32'; then
|
||||||
echo -e "2.\e[92m Cron already added."
|
echo -e "\e[34m2.\e[92m Cron already added."
|
||||||
else
|
else
|
||||||
echo -e "2.\e[92m Cron added."
|
echo -e "\e[34m2.\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
|
||||||
|
|
||||||
|
@ -133,7 +138,7 @@ fi
|
||||||
## Generate first stats
|
## Generate first stats
|
||||||
/usr/bin/motds32 -g
|
/usr/bin/motds32 -g
|
||||||
|
|
||||||
echo -e "\n\e[0m3. \e[92mMOTDs32 Installation completed!\e[0m \n\n Use: /usr/bin/motds32 for help\n"
|
echo -e "\n\e[34m3. \e[92mMOTDs32 Installation completed!\e[0m \n\n Use: /usr/bin/motds32 for help\n"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
#EOF
|
#EOF
|
||||||
|
|
Loading…
Reference in a new issue