modif install
This commit is contained in:
parent
f166c89358
commit
ebbce0dc01
1 changed files with 13 additions and 21 deletions
26
install.sh
26
install.sh
|
@ -90,8 +90,8 @@ echo -e "\n\e[92m Please Select:"
|
||||||
echo -e " 1. \e[0m(auto) Install Missing Package\e[92m"
|
echo -e " 1. \e[0m(auto) Install Missing Package\e[92m"
|
||||||
echo -e " 2. \e[0mContinue installation script\e[92m"
|
echo -e " 2. \e[0mContinue installation script\e[92m"
|
||||||
echo -e " 3. \e[0mUninstall completly the script\e[92m"
|
echo -e " 3. \e[0mUninstall completly the script\e[92m"
|
||||||
echo -e " 0. \e[0m(or Enter) to Quit\n \e[0m"
|
echo -e " 0. \e[0m(Enter or any key) to Quit\n \e[0m"
|
||||||
read -p " Enter selection [0-3] > " selection
|
read -p " Enter selection [0-3] or (Enter) to Quit > " selection
|
||||||
|
|
||||||
# Clear area beneath menu
|
# Clear area beneath menu
|
||||||
tput cup 10 0
|
tput cup 10 0
|
||||||
|
@ -165,15 +165,10 @@ tput cup 11 0
|
||||||
(crontab -l ; echo "*/5 * * * * /usr/bin/motds32 -g 2>1")| crontab -
|
(crontab -l ; echo "*/5 * * * * /usr/bin/motds32 -g 2>1")| crontab -
|
||||||
fi
|
fi
|
||||||
## Generate first stats
|
## Generate first stats
|
||||||
if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; fi
|
if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; echo "Genrate first Stat"; fi
|
||||||
|
|
||||||
echo -e "\n\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\n\n Help? Use: \n \033[1;30m /usr/bin/motds32\e[0m \n or \033[1;30m\n motd\e[0m\n"
|
echo -e "\n\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\n\n Help? Use: \n \033[1;30m /usr/bin/motds32\e[0m \n or \033[1;30m\n motd\e[0m\n"
|
||||||
printf "\n \e[1;33m (Press any key to exit.)\e[0m"
|
printf "\n \e[1;33m (Press any key to Continue.)\e[0m"
|
||||||
read -n 1
|
|
||||||
echo "Installation MOTDs32 terminated."
|
|
||||||
#exit 1
|
|
||||||
# Restore screen
|
|
||||||
#tput rmcup
|
|
||||||
;;
|
;;
|
||||||
2) echo -e "\n\e[92m"
|
2) echo -e "\n\e[92m"
|
||||||
if [ `grep -c /etc/motd /root/.bashrc` == 0 ]
|
if [ `grep -c /etc/motd /root/.bashrc` == 0 ]
|
||||||
|
@ -200,7 +195,6 @@ echo "Installation MOTDs32 terminated."
|
||||||
echo -e " -->\e[34m Stats32 \e[92mINSTALLED\e[0m"
|
echo -e " -->\e[34m Stats32 \e[92mINSTALLED\e[0m"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Copy font figlet
|
# Copy font figlet
|
||||||
if [ -f "/usr/share/figlet" ]
|
if [ -f "/usr/share/figlet" ]
|
||||||
then
|
then
|
||||||
|
@ -227,12 +221,10 @@ echo "Installation MOTDs32 terminated."
|
||||||
(crontab -l ; echo "*/5 * * * * /usr/bin/motds32 -g 2>1")| crontab -
|
(crontab -l ; echo "*/5 * * * * /usr/bin/motds32 -g 2>1")| crontab -
|
||||||
fi
|
fi
|
||||||
## Generate first stats
|
## Generate first stats
|
||||||
if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; fi
|
if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; echo "Genrate first stat"; fi
|
||||||
|
|
||||||
echo -e "\n\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\n\n Help? Use: \n \033[1;30m /usr/bin/motds32\e[0m \n or \033[1;30m\n motd\e[0m\n"
|
echo -e "\n\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\n\n Help? Use: \n \033[1;30m /usr/bin/motds32\e[0m \n or \033[1;30m\n motd\e[0m\n"
|
||||||
printf "\n \e[1;33m (Press any key to exit.)\e[0m"
|
printf "\n \e[1;33m (Press any key to exit.)\e[0m"
|
||||||
read -n 1
|
|
||||||
echo "Installation MOTDs32 terminated."
|
|
||||||
;;
|
;;
|
||||||
3) echo -e "\n\e[34m Dsinstallation of MOTDs32 in progress... \e[0m"
|
3) echo -e "\n\e[34m Dsinstallation of MOTDs32 in progress... \e[0m"
|
||||||
## remove file and directory
|
## remove file and directory
|
||||||
|
@ -243,11 +235,11 @@ echo "Installation MOTDs32 terminated."
|
||||||
|
|
||||||
## remove cron
|
## remove cron
|
||||||
if crontab -l | grep -q '/usr/bin/motds32'; then
|
if crontab -l | grep -q '/usr/bin/motds32'; then
|
||||||
echo -e "2.\e[92m Cron localized\n"
|
echo -e " \e[92m Cron localized\n"
|
||||||
crontab -l | grep -v '/usr/bin/motds32 -g 2>1' | crontab -u root -
|
crontab -l | grep -v '/usr/bin/motds32 -g 2>1' | crontab -u root -
|
||||||
echo -e "2.\e[92m Cron removed\n"
|
echo -e " \e[92m Cron removed\n"
|
||||||
else
|
else
|
||||||
echo -e "2.\e[93m Cron not find\n"
|
echo -e " \e[93m Cron not find\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ `grep -c /etc/motd /root/.bashrc` == 0 ]
|
if [ `grep -c /etc/motd /root/.bashrc` == 0 ]
|
||||||
|
@ -261,6 +253,7 @@ echo "Installation MOTDs32 terminated."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n\e[92m Script MOTDs32 has been completly removed \e[0m"
|
echo -e "\n\e[92m Script MOTDs32 has been completly removed \e[0m"
|
||||||
|
printf "\n \e[1;33m (Press any key.)\e[0m"
|
||||||
;;
|
;;
|
||||||
0) break
|
0) break
|
||||||
;;
|
;;
|
||||||
|
@ -274,7 +267,6 @@ if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; echo "genrate first stat"
|
||||||
# echo -e "\n\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\n\n Help? Use: \n \033[1;30m /usr/bin/motds32\e[0m \n or \033[1;30m\n motd\e[0m\n"
|
# echo -e "\n\n\e[34m \e[92m Installation of MOTDs32 completed!\e[0m \n\n\n Help? Use: \n \033[1;30m /usr/bin/motds32\e[0m \n or \033[1;30m\n motd\e[0m\n"
|
||||||
# printf "\n \e[1;33m (Press any key to exit.)\e[0m"
|
# printf "\n \e[1;33m (Press any key to exit.)\e[0m"
|
||||||
# read -n 1
|
# read -n 1
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
# Restore screen
|
# Restore screen
|
||||||
|
|
Loading…
Reference in a new issue