Bug fixes

This commit is contained in:
Brian Zalewski 2023-05-30 02:28:25 +00:00
parent 480b098508
commit 18617ca56b
8 changed files with 24 additions and 10 deletions

View file

@ -291,7 +291,7 @@ softwareGroups:
- axel
- bin
- bitly
- cog
- cod
- desed
- emoj
- fig

View file

@ -256,7 +256,7 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app
# if [ ! -d "$SETTINGS_DIR/profile.private" ]; then
# logg info 'Downloading the encrypted Firefox private profile'
# cd "$SETTINGS_DIR"
# curl -sSL '{{ .firefoxPrivateProfile }}' -o profile.private.tar.gz.age
# curl -sSL '{ { .firefoxPrivateProfile } }' -o profile.private.tar.gz.age
# logg info 'Decrypting the Firefox private profile'
# chezmoi decrypt profile.private.tar.gz.age > profile.private.tar.gz || EXIT_DECRYPT_CODE=$?
# if [ -z "$EXIT_DECRYPT_CODE" ]; then

View file

@ -11,13 +11,16 @@
### Run logic if VirtualBox is installed
if command -v VirtualBox > /dev/null; then
### Install VirtualBox extension pack if it is not installed already
if [ ! -d /usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack ]; then
if [ ! -d /usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack ] && [ ! -d /Applications/VirtualBox.app/Contents/MacOS/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack ]; then
logg info 'Acquiring VirtualBox version information'
VBOX_VERSION="$(VirtualBox --help | head -n 1 | cut -f 6 -d' ')"
VBOX_VERSION="${VBOX_VERSION//v}"
### Set up folders
sudo mkdir -p /usr/lib/virtualbox/ExtensionPacks
# Check for macOS installation before creating ExtensionPacks folder on Linux machines
if [ ! -d /Applications/VirtualBox.app ]; then
sudo mkdir -p /usr/lib/virtualbox/ExtensionPacks
fi
mkdir -p /tmp/vbox
cd /tmp/vbox

View file

@ -14,7 +14,8 @@
if command -v netdata-claim.sh > /dev/null; then
NETDATA_TOKEN="{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NETDATA_TOKEN")) }}{{ includeTemplate "secrets/NETDATA_TOKEN" | decrypt }}{{ else }}{{ env "NETDATA_TOKEN" }}{{ end }}"
NETDATA_ROOM="{{ if (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "NETDATA_ROOM")) }}{{ includeTemplate "secrets/NETDATA_ROOM" | decrypt }}{{ else }}{{ env "NETDATA_ROOM" }}{{ end }}"
netdata-claim.sh -token="$NETDATA_TOKEN" -rooms="$NETDATA_ROOM" -url="{{ .netdataClaimURL }}"
# netdata-claim.sh must be run as netdata user
sudo -H -u netdata bash -c 'netdata-claim.sh -token="$NETDATA_TOKEN" -rooms="$NETDATA_ROOM" -url="{{ .netdataClaimURL }}"'
# Kernel optimizations
# These are mentioned while installing via the kickstart.sh script method. We are using Homebrew for the installation though.

View file

@ -25,4 +25,3 @@ if command -v nginx > /dev/null; then
fi
{{ end -}}
{{ end -}}

View file

@ -14,7 +14,7 @@
### Initialize ZSH so plugin bootstrap process is done ahead of time
if command -v zsh > /dev/null; then
logg info 'Bootstrapping ZSH by running `exec zsh && exit 0`'
exec zsh && exit 0
logg info 'Bootstrapping ZSH by running `exec zsh`'
exec zsh
fi
{{ end -}}

View file

@ -748,9 +748,17 @@ async function beforeInstall(packageManager) {
if (!brewUpdated) {
brewUpdated = true
try {
runCommand('Running brew update', `brew update`)
runCommand('Running brew update / upgrade', `brew update && brew upgrade`)
} catch (e) {
log('error', 'Homebrew', 'Failed running brew update')
console.log(e)
log('error', 'Homebrew', 'Failed running brew update / upgrade')
log('info', 'Homebrew', 'Running brew tap --repair and trying again')
try {
runCommand('Repairing taps and retrying brew update / upgrade', 'brew tap --repair && brew update && brew upgrade')
} catch (e) {
console.log(e)
log('error', 'Homebrew', 'Failed both attempts to run brew update / upgrade')
}
}
}
} else if (packageManager === 'cargo') {
@ -1735,6 +1743,7 @@ async function linkBin(installOrdersBinLink) {
log('warn', 'Bin', `Expected Homebrew cask directory not found - ${pkg}`)
}
} catch (e) {
console.log(e)
log('warn', 'Bin', `Error creating bin shortcut link for ${pkg}`)
}
}
@ -1773,6 +1782,7 @@ async function installSoftware(pkgsToInstall) {
console.error(e)
}
installOrders = await pruneInstallOrders(installOrders)
delete installOrders._deps
console.log('Install orders:', installOrders)
packageManagers.length && log('info', 'Pre-Reqs', `Running package manager pre-installation steps`)
for (const packageManager of packageManagers) {

View file

@ -7997,6 +7997,7 @@ softwarePackages:
ansible: professormanhattan.vagrant
apt: vagrant
brew: hashicorp/tap/vagrant
cask: vagrant
choco: vagrant
dnf:fedora: vagrant
pacman: vagrant