Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
#!/bin/bash | |
# | |
# Set up OSX preferences | |
# | |
# Inspired by: https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
########################################### | |
# CONFIG | |
HOSTNAME="machiavellia" | |
TIMEZONE="America/Chicago" # 'systemsetup -listtimezones' |
################################################################################ | |
# Prevent OSX calling home # | |
# # | |
# Mix of different /etc/hosts files found over internet, and calls filtered # | |
# using LittleSnitch for months. # | |
# # | |
# OSX sends a huge amount of requests to Cuppertino, even when you don't use # | |
# Spotlight suggestions, iCloud, updates and other services. Even if they are # | |
# disabled. # | |
# # |
# Complete macOS Setup | |
# From clean install to fully configured. | |
# Step 1: Init Environment | |
#Temporarily Disable sudo Password Timeout | |
#The sudo password timeout is re-enabled at the end of this script. ##+BEGIN_SRC sh sudo tee /etc/sudoers.d/timeout > /dev/null <<-EOF Defaults timestamp_timeout=-1 EOF ##+END_SRC | |
##+BEGIN_SRC sh sudo tee /etc/sudoers.d/installer > /dev/null <<-EOF %admin ALL=(ALL) NOPASSWD:SETENV: /usr/sbin/installer EOF ##+END_SRC |
# /etc/logrotate.d/cloudflared | |
/var/log/cloudflared/cloudflared.log { | |
rotate 7 | |
daily | |
compress | |
missingok | |
notifempty | |
} |
Get old OS X/ macOS installer from the App Store via mas.
Direct links prioir to Catalina via Rich Trouton
Direct link: https://apps.apple.com/gb/app/macos-monterey/id1576738294
#!/bin/sh | |
# Set the macOS installer path as a variable | |
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")" | |
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport" | |
echo "macOS installer is \"$MACOS_INSTALLER\"" | |
# Set the target disk as a variable | |
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//') | |
echo "Target disk is \"$TARGET\"" |
To support my open-source work, consider adding me on Patreon.
An easy to refer to document for regularly setting up macOS 10.15 Catalina.
The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.
#!/bin/bash | |
CYAN="$(tput bold; tput setaf 6)" | |
RESET="$(tput sgr0)" | |
clear | |
if command -v python3 > /dev/null 2>&1; then | |
if [ $(python3 -c "print('ye')") = "ye" ]; then | |
clear |