mirror of
https://github.com/PurpleComputing/troubleshooting.git
synced 2026-02-03 06:03:23 +00:00
Create fix-spotlight-monterey.zsh
This commit is contained in:
18
fix-spotlight-monterey.zsh
Normal file
18
fix-spotlight-monterey.zsh
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env zsh
|
||||
|
||||
LOG_NAME="fix_mont_spotlight.log"
|
||||
LOG_DIR="/Library/Logs/com.purplecomputing.mdm"
|
||||
PRPLLOGPATH="$LOG_DIR/$LOG_NAME"
|
||||
|
||||
echo $(date +%F) Disabling Spotlight Index >> $PRPLLOGPATH
|
||||
mdutil -Eai off >> $PRPLLOGPATH
|
||||
|
||||
sleep 5
|
||||
|
||||
echo $(date +%F) Enabling Spotlight Index Part 1 >> $PRPLLOGPATH
|
||||
mdutil -Eai on >> $PRPLLOGPATH
|
||||
|
||||
sleep 5
|
||||
|
||||
echo $(date +%F) Enabling Spotlight Index Part 2 >> $PRPLLOGPATH
|
||||
mdutil -as >> $PRPLLOGPATH
|
||||
Reference in New Issue
Block a user