Update Install.sh
This commit is contained in:
parent
05de41b853
commit
7202dd5c95
1 changed files with 19 additions and 4 deletions
15
Install.sh
15
Install.sh
|
@ -54,6 +54,11 @@ cat <<"EOF"
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# Make sure only root can run our script
|
||||||
|
if [[ $EUID -ne 0 ]]; then
|
||||||
|
echo "This script must be run as root" 1>&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo -e "\n\e[34mInstallation of MOTDs32 in progress... \e[0m"
|
echo -e "\n\e[34mInstallation of MOTDs32 in progress... \e[0m"
|
||||||
|
|
||||||
|
@ -87,8 +92,18 @@ if echo "$answer" | grep -iq "^y" ;then
|
||||||
echo -e "\n1.\e[92m installation \e[0m ntp figlet \e[92m start\e[0m \n" ; apt-get install -y ntp figlet; make install
|
echo -e "\n1.\e[92m installation \e[0m ntp figlet \e[92m start\e[0m \n" ; apt-get install -y ntp figlet; make install
|
||||||
echo -e "\n\e[92m apt-get installation \e[0m Succesfull \n"
|
echo -e "\n\e[92m apt-get installation \e[0m Succesfull \n"
|
||||||
else
|
else
|
||||||
|
echo -e "\n Continue the script (y/n)? "
|
||||||
|
old_stty_cfg=$(stty -g)
|
||||||
|
stty raw -echo
|
||||||
|
answer2=$( while ! head -c 1 | grep -i '[ny]' ;do true ;done )
|
||||||
|
if echo "$answer2" | grep -iq "^y" ;then
|
||||||
echo -e "\n1.\e[92m ok no apt-get required \e[0m Installation continue... \n"; make install
|
echo -e "\n1.\e[92m ok no apt-get required \e[0m Installation continue... \n"; make install
|
||||||
|
else
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo -e "Make command inprogress"
|
echo -e "Make command inprogress"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue