Browse Source

Update MacInitial.sh

MoeClub 4 năm trước cách đây
mục cha
commit
423f1f7037
1 tập tin đã thay đổi với 10 bổ sung3 xóa
  1. 10 3
      MacInitial.sh

+ 10 - 3
MacInitial.sh

@@ -211,11 +211,18 @@ RENAMEBIN "/usr/sbin/spindump"
 
 # Disable Update Notice
 echo -e "\n# Disable Update Notice ..."
+if [ -f "/usr/bin/sudo" ]; then
+sudo find "/System/Library/PrivateFrameworks/SoftwareUpdate.framework" -type f -name "SoftwareUpdateNotificationManager" |xargs -t -I "{}" sudo chmod 644 "{}"
+else
 find "/System/Library/PrivateFrameworks/SoftwareUpdate.framework" -type f -name "SoftwareUpdateNotificationManager" |xargs -t -I "{}" chmod 644 "{}"
+fi
 
 # Disable Update Check
-#echo -e "\n# Disable Update Check ..."
-#find "/System/Library/CoreServices/Software Update.app" -type f -name "softwareupdated" |xargs -t -I "{}" chmod 644 "{}"
-
+echo -e "\n# Disable Update Check ..."
+if [ -f "/usr/bin/sudo" ]; then
+sudo find "/System/Library/CoreServices/Software Update.app" -type f -name "softwareupdated" |xargs -t -I "{}" sudo chmod 644 "{}"
+else
+find "/System/Library/CoreServices/Software Update.app" -type f -name "softwareupdated" |xargs -t -I "{}" chmod 644 "{}"
+fi
 # Finish
 echo -e "\n# Finish! \n"