Update .local/share/chezmoi/home/.chezmoiscripts/darwin/run_onchange_after_10_configure-macos.tmpl

This commit is contained in:
Brian Zalewski 2022-12-05 05:59:20 +00:00
parent a243ae91a4
commit 35a522fe82

View file

@ -5,16 +5,16 @@
logg 'Applying optimized macOS settings' logg 'Applying optimized macOS settings'
# Ask for the administrator password upfront
logg info 'A sudo password is required to apply some of the macOS optimizations.'
sudo echo "Sudo access granted."
set -x set -x
# Close any open System Preferences panes, to prevent them from overriding # Close any open System Preferences panes, to prevent them from overriding
# settings were about to change # settings were about to change
osascript -e 'tell application "System Preferences" to quit' osascript -e 'tell application "System Preferences" to quit'
# Ask for the administrator password upfront
logg info 'A sudo password is required to apply some of the macOS optimizations.'
sudo echo "Sudo access granted."
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished # Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &