Parcourir la source

Added excluding cleaning history for BCK server

pmacko il y a 3 semaines
Parent
commit
9179a21dd2
1 fichiers modifiés avec 8 ajouts et 2 suppressions
  1. 8 2
      clean.sh

+ 8 - 2
clean.sh

@@ -5,7 +5,7 @@
 #########################################################################
 
 #------------------------------ VERSION --------------------------------#
-VER="1.1"
+VER="1.2"
 
 #------------------------------ HISTORY --------------------------------#
 chhis(){
@@ -68,7 +68,13 @@ fi
 }
 
 #------------------------------ CORE ----------------------------------#
-chhis
+SRV=$(hostname -s)
+if [[ "$SRV" == *"bck"* ]] || [[ "$SRV" == *"BCK"* ]];
+then
+  echo -e "- \e[1;33mCleaning history\e[0m \e[1;31mNOT allowed\e[0m"
+else
+  chhis
+fi
 chlog
 chpac
 chjou