This commit is contained in:
Brian Zalewski 2023-12-06 06:58:56 +00:00
parent 9daf56798d
commit 55417196dd
4 changed files with 410 additions and 402 deletions

View file

@ -35,12 +35,17 @@
# Running sudo softwareupdate -i -a -R --agree-to-license reboots just not in the script due to the running processes perhaps
# Check for pending reboot by checking
if [ -d /Applications ] && [ -d /Library ] && [ -z "$NO_RESTART" ]; then
logg info 'Applying OS upgrades (if available)'
sudo softwareupdate -i -a --agree-to-license || logg error 'Failed to trigger a system update via sudo softwareupdate -i -a --agree-to-license --background'
logg info 'If system updates are downloaded / installed, a reboot might be required.'
### Source: https://community.jamf.com/t5/jamf-pro/determine-if-update-requires-restart/m-p/11682
if softwareupdate -l | grep restart > /dev/null; then
if [ ! -f "$HOME/.zshrc" ] || ! cat "$HOME/.zshrc" | grep '# TEMPORARY FOR INSTALL DOCTOR MACOS' > /dev/null; then
echo 'bash <(curl -sSL https://install.doctor/start) # TEMPORARY FOR INSTALL DOCTOR MACOS' >> "$HOME/.zshrc"
fi
logg info 'Applying OS upgrades (if available)'
sudo softwareupdate -i -a --agree-to-license --background || logg error 'Failed to trigger a system update via sudo softwareupdate -i -a --agree-to-license --background'
logg info 'If system updates are downloaded / installed, a reboot might be required.'
logg info 'Reboot required - shutting down immediately' && sudo shutdown -r now
# TODO - Automatically log in after reboot
fi
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

View file

@ -60,8 +60,10 @@
]
},
"acme": {
"domains": ["sftp.{{ $baseDomain }}"],
"email": "{{ .user.cloudflare.username }}",
"domains": [
"sftp.{{- $baseDomain -}}"
],
"email": "{{- .user.cloudflare.username -}}",
"key_type": "4096",
"certs_path": "certs",
"ca_endpoint": "https://acme-v02.api.letsencrypt.org/directory",
@ -404,13 +406,13 @@
"smtp": {
"host": "smtp.sendgrid.net",
"port": 587,
"from": "LitOS SFTPGo <no-reply@{{ .host.domain }}",
"from": "SFTPGo <no-reply@{{ .host.domain }}",
"user": "apikey",
"password": "{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SENDGRID_API_KEY")) }}{{ includeTemplate "secrets/SENDGRID_API_KEY" | decrypt | trim }}{{ else }}{{ env "SENDGRID_API_KEY" }}",
"password": "{{- if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "SENDGRID_API_KEY")) -}}{{- includeTemplate "secrets/SENDGRID_API_KEY" | decrypt | trim -}}{{- else -}}{{- env "SENDGRID_API_KEY" -}}{{- end -}}",
"auth_type": 0,
"encryption": 1,
"domain": "",
"templates_path": "templates"
},
"plugins": []
}
}

View file

@ -380,6 +380,7 @@ if command -v brew > /dev/null; then
installBrewPackage gum
installBrewPackage node
installBrewPackage zx
installBrewPackage expect
fi
### Clones the source repository

View file

@ -89,7 +89,7 @@ setCIEnvironmentVariables() {
logg info "Setting HEADLESS_INSTALL to true " && export HEADLESS_INSTALL=true
logg info "Setting SOFTWARE_GROUP to Full-Desktop" && export SOFTWARE_GROUP="Full-Desktop"
logg info "Setting FULL_NAME to Brian Zalewski" && export FULL_NAME="Brian Zalewski"
logg info "Setting PRIMARY_EMAIL to help@megabyte.space" && export PRIMARY_EMAIL="help@megabyte.space"
logg info "Setting PRIMARY_EMAIL to brian@megabyte.space" && export PRIMARY_EMAIL="brian@megabyte.space"
logg info "Setting PUBLIC_SERVICES_DOMAIN to lab.megabyte.space" && export PUBLIC_SERVICES_DOMAIN="lab.megabyte.space"
logg info "Setting RESTRICTED_ENVIRONMENT to false" && export RESTRICTED_ENVIRONMENT=false
logg info "Setting WORK_ENVIRONMENT to false" && export WORK_ENVIRONMENT=false