first commit

This commit is contained in:
Erreur32 2020-04-16 14:46:22 +02:00
parent 2d1520c3da
commit faaaa9b7f9

View file

@ -110,7 +110,7 @@ echo -e " \e[34m- build-essential \e[1;31mSelect option 1 \e[91m Missing pa
echo -e "\n YOU CAN SKIP (auto) install if you want" echo -e "\n YOU CAN SKIP (auto) install if you want"
echo -e "\n\e[92m Please Select:" 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[0mInstallation/(CHECK) MOTDs32 script\e[92m" echo -e " 2. \e[0mInstallation/Update MOTDs32 script\e[92m"
echo -e " 3. \e[0mUninstall completly MOTDs32 script\e[92m" echo -e " 3. \e[0mUninstall completly MOTDs32 script\e[92m"
echo -e " 0. \e[0m(Enter or any key) 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] or (Enter) to Quit > " selection read -p " Enter selection [0-3] or (Enter) to Quit > " selection
@ -141,7 +141,7 @@ tput cup 11 0
echo -e "\e[92m" echo -e "\e[92m"
if [ `grep -c /etc/motd ~/.bashrc` == 0 ] if [ `grep -c /etc/motd ~/.bashrc` == 0 ]
then then
echo -e " \e[1;31m code bash missing" echo -e " \e[31m code bash missing\e[0m"
echo "cat /etc/motd" >> ~/.bashrc echo "cat /etc/motd" >> ~/.bashrc
echo -e "\e[92m - Code bash \e[0madded.\n" echo -e "\e[92m - Code bash \e[0madded.\n"
else else
@ -156,7 +156,7 @@ tput cup 11 0
if [ -f "/etc/motds32/Stats32" ] if [ -f "/etc/motds32/Stats32" ]
then then
echo -e " -->\e[34m Stats32 \e[92mOK\e[0m" echo -e " -->\e[34m Stats32 \e[92mOK\e[0m"
cp Stats32 /etc/motds32/Stats32 cp -f Stats32 /etc/motds32/Stats32
else else
cp -f Stats32 /etc/motds32/Stats32 cp -f Stats32 /etc/motds32/Stats32
echo -e " -->\e[34m Stats32 \e[92mINSTALLED\e[0m" echo -e " -->\e[34m Stats32 \e[92mINSTALLED\e[0m"
@ -193,14 +193,14 @@ if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; fi
printf "\n \e[1;33m (Press 0 to exit)\e[0m" printf "\n \e[1;33m (Press 0 to exit)\e[0m"
printf "\n \e[1;33m (Or any key to go back.)\e[0m" printf "\n \e[1;33m (Or any key to go back.)\e[0m"
;; ;;
2) echo -e "\n\e[92m" 2) echo -e "\n\e[92m" ;
if [ `grep -c /etc/motd ~/.bashrc` == 0 ] if [ `grep -c /etc/motd ~/.bashrc` == 0 ]
then then
echo -e " code bash missing" echo -e " code bash missing"
echo "cat /etc/motd" >> ~/.bashrc echo "cat /etc/motd" >> ~/.bashrc
echo -e "\e[92m - Code bash \e[0madded.\n" echo -e "\e[92m - Code bash \e[0madded.\n"
else else
grepmot=`grep '/etc/motd' ~/.bashrc` grepmot=$(grep "etc/motd" ~/.bashrc)
echo -e " \e[1;30m Code bash found: \e[0m>>\e[0m $grepmot \e[0m<<\n" echo -e " \e[1;30m Code bash found: \e[0m>>\e[0m $grepmot \e[0m<<\n"
echo -e " -->\e[34m Code bash: \e[92mOK\e[0m" echo -e " -->\e[34m Code bash: \e[92mOK\e[0m"
fi fi
@ -218,13 +218,13 @@ if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; fi
make install make install
echo -e "\n\e[34m - Make file done.\e[0m\n" echo -e "\n\e[34m - Make file done.\e[0m\n"
fi fi
if [ -f "/etc/motds32/Stats32" ] if [ -f "/etc/motds32/Stats32" ]
then then
echo -e " -->\e[34m Stats32 \e[92mOK\e[0m" echo -e " -->\e[34m Stats32 \e[92mOK\e[0m"
cp Stats32 /etc/motds32/Stats32 -Rf cp Stats32 /etc/motds32/Stats32 -f
else else
cp Stats32 /etc/motds32/Stats32 -Rf cp Stats32 /etc/motds32/Stats32 -f
echo -e " -->\e[34m Stats32 \e[92mINSTALLED\e[0m" echo -e " -->\e[34m Stats32 \e[92mINSTALLED\e[0m"
fi fi
@ -249,12 +249,13 @@ if test -f /usr/bin/motds32; then /usr/bin/motds32 -g; 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 "\e[34m - Cron \e[0m>> already added.\e[0m" echo -e "\e[34m - Cron \e[0m>> already added.\e[0m"
/usr/bin/motds32 -g
else else
echo -e "\e[34m - Cron added.\e[0m" echo -e "\e[34m - Cron added.\e[0m"
(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; fi
echo -e "\n\n\e[34m \e[92m 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 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"