Fixes gsed error
This commit is contained in:
parent
c96ec4ef16
commit
93d64340c1
3 changed files with 16 additions and 10 deletions
|
@ -36,6 +36,7 @@ ensureFullDiskAccess() {
|
|||
ensureFullDiskAccess
|
||||
else
|
||||
logg success 'Current terminal has full disk access'
|
||||
if [ -f "$HOME/.zshrc" ]; then
|
||||
if command -v gsed > /dev/null; then
|
||||
sudo gsed -i '/# TEMPORARY FOR INSTALL DOCTOR MACOS/d' "$HOME/.zshrc" || logg warn "Failed to remove kickstart script from .zshrc"
|
||||
else
|
||||
|
@ -43,6 +44,7 @@ ensureFullDiskAccess() {
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# @description Applies changes that require input from the user such as using Touch ID on macOS when
|
||||
|
|
|
@ -46,11 +46,13 @@ if [ -d /Applications ] && [ -d /Library ] && [ -z "$NO_RESTART" ]; then
|
|||
logg info 'Reboot required - shutting down immediately' && sudo shutdown -r now
|
||||
# TODO - Automatically log in after reboot
|
||||
fi
|
||||
if [ -f "$HOME/.zshrc" ]; then
|
||||
if command -v gsed > /dev/null; then
|
||||
sudo gsed -i '/# TEMPORARY FOR INSTALL DOCTOR MACOS/d' "$HOME/.zshrc" || logg warn "Failed to remove kickstart script from .zshrc"
|
||||
else
|
||||
sudo sed -i '/# TEMPORARY FOR INSTALL DOCTOR MACOS/d' "$HOME/.zshrc" || logg warn "Failed to remove kickstart script from .zshrc"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
### Ensure dependencies are installed on Linux
|
||||
|
|
|
@ -18,8 +18,10 @@ if [ -n "$HEADLESS_INSTALL" ] && [ -z "$SSH_CONNECTION" ] && [ -d /System ] && [
|
|||
# Source: https://developers.cloudflare.com/cloudflare-one/static/documentation/connections/Cloudflare_CA.pem
|
||||
### Ensure certificate installed on macOS
|
||||
logg info '**macOS Manual Security Permission** Requesting security authorization for Cloudflare trusted certificate'
|
||||
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$HOME/.local/etc/ssl/cloudflare/Cloudflare_CA.crt"
|
||||
|
||||
CRT_TMP="$(mktemp)"
|
||||
curl -sSL https://developers.cloudflare.com/cloudflare-one/static/documentation/connections/Cloudflare_CA.crt > "$CRT_TMP"
|
||||
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "$CRT_TMP" && logg success 'Successfully imported Cloudflare_CA.crt into System.keychain'
|
||||
rm -f "$CRT_TMP"
|
||||
# Source: https://apple.stackexchange.com/questions/30238/how-to-enable-os-x-screen-sharing-vnc-through-ssh
|
||||
# To disable, run: sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off
|
||||
# Only enable when computer is not a corporate / work computer
|
||||
|
|
Loading…
Reference in a new issue