From 7124c3bb2217efa5da5b5efe2acb92aceaed56f0 Mon Sep 17 00:00:00 2001 From: Erreur32 Date: Thu, 20 Jul 2017 21:29:39 +0200 Subject: [PATCH] Update unisntall.sh --- unisntall.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/unisntall.sh b/unisntall.sh index c19a9fb..8bbf109 100755 --- a/unisntall.sh +++ b/unisntall.sh @@ -34,10 +34,18 @@ fi echo -e "\n\e[34m Dsinstallation of MOTDs32 in progress... \e[0m" -## remove all stuff - +## remove file and directory make uninstall rm /etc/motds32/ -Rf rm /usr/bin/motd -f -echo -e "\n\e[92m MOTDs32 removed \e[0m" +## remove cron +if crontab -l | grep -q '/usr/bin/motds32'; then +echo -e "2.\e[92m Cron localized\n" +crontab -l | grep -v '/usr/bin/motds32 -g 2>1' | crontab -u root - +echo -e "2.\e[92m Cron removed\n" +else +echo -e "2.\e[93m Cron not find\n" +fi + +echo -e "\n\e[92m Script MOTDs32 has been removed \e[0m"