瀏覽代碼

Added excluding cleaning history for BCK server

pmacko 3 周之前
父節點
當前提交
9179a21dd2
共有 1 個文件被更改,包括 8 次插入2 次删除
  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