Removed markdown from script logic

This commit is contained in:
Brian Zalewski 2023-11-05 01:46:18 +00:00
parent 614550195e
commit c572a01ba5
129 changed files with 469 additions and 469 deletions

View file

@ -42,7 +42,7 @@ For more information about storing secrets like SSH keys and API keys, refer to
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
logg info 'Decrypting SSH keys stored in the `home/.chezmoitemplates/ssh` folder of the Install Doctor repo / fork.'
logg info 'Decrypting SSH keys stored in the home/.chezmoitemplates/ssh folder of the Install Doctor repo / fork.'
find "{{ .chezmoi.sourceDir }}/.chezmoitemplates/ssh" -type f | while read SSH_FILE; do
### Decrypt SSH file with Chezmoi
logg info 'Decrypting the $(basename "$SSH_FILE") encrypted SSH file'

View file

@ -43,7 +43,7 @@ find '{{ .host.homeParentFolder }}' -mindepth 1 -maxdepth 1 -type d | while read
USER_FOLDER="$(echo "$HOME_DIR" | sed 's/.*\/\([^\/]*\)$/\1/')"
if [ -d "$HOME_DIR/.local" ]; then
if [ ! -d "/var/log/user/$USER_FOLDER" ]; then
logg info 'Creating `/var/log/user/'"$USER_FOLDER"'`'
logg info 'Creating /var/log/user/'"$USER_FOLDER"''
sudo mkdir -p "/var/log/user/$USER_FOLDER"
fi
fi

View file

@ -40,7 +40,7 @@ invoked with the `python` command.
### Symlink python3 to python if it is unavailable
if ! command -v python > /dev/null && command -v python3 > /dev/null; then
logg info 'Symlinking `python3` to `python` since the latter is unavailable'
logg info 'Symlinking python3 to python since the latter is unavailable'
sudo ln -s "$(which python3)" /usr/local/bin/python
fi

View file

@ -35,7 +35,7 @@ key is only readable and writable the provisioning user.
### Ensure id_rsa is present and create one if it does not exist
if [ ! -f "$HOME/.ssh/id_rsa" ]; then
logg 'Generating missing default private key / public key (`~/.ssh/id_rsa`)'
logg 'Generating missing default private key / public key (~/.ssh/id_rsa)'
ssh-keygen -b 4096 -t rsa -f "$HOME/.ssh/id_rsa" -q -N ""
chmod 600 "$HOME/.ssh/id_rsa"
fi

View file

@ -42,7 +42,7 @@ logg info 'Ensuring public keys are present'
find "$HOME/.ssh" -type f -maxdepth 1 ! -name "*.pub" ! -name "authorized_keys*" ! -name "known_host*" ! -name "config" | while read FILE; do
if [ ! -f "${FILE}.pub" ]; then
logg info 'Generating missing public key for `'"$FILE"'`'
logg info 'Generating missing public key for '"$FILE"''
ssh-keygen -f "$FILE" -y > "${FILE}.pub"
chmod 600 "${FILE}.pub"
fi

View file

@ -59,7 +59,7 @@ This script must run before the `install-packages` script because some of the An
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
{{ $roleDirs := (output "find" (joinPath .chezmoi.homeDir ".local" "src" "gas-station" "roles") "-mindepth" "2" "-maxdepth" "2" "-type" "d") -}}
{{ $roleDirs := (output "find" (joinPath .chezmoi.homeDir ".local" "share" "gas-station" "roles") "-mindepth" "2" "-maxdepth" "2" "-type" "d") -}}
{{- range $roleDir := splitList "\n" $roleDirs -}}
{{- if ne $roleDir "" -}}
# {{ $roleDir }}
@ -68,11 +68,11 @@ This script must run before the `install-packages` script because some of the An
logg info 'Ensuring Gas Station roles are symlinked to ~/.local/share/ansible/roles'
mkdir -p "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles"
find "$HOME/.local/src/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | while read ROLE_PATH; do
find "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | while read ROLE_PATH; do
ROLE_FOLDER="professormanhattan.$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
ALT_ROLE_FOLDER="$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
if [ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER" ] || [ "$(readlink -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER")" != "$ROLE_PATH" ]; then
logg info 'Symlinking `'"$ROLE_FOLDER"'`'
logg info 'Symlinking '"$ROLE_FOLDER"''
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER"
ln -s "$ROLE_PATH" "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER"
fi
@ -82,16 +82,16 @@ find "$HOME/.local/src/gas-station/roles" -mindepth 2 -maxdepth 2 -type d | whil
fi
done
if [ -f "$HOME/.local/src/gas-station/requirements.yml" ]; then
if [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/requirements.yml" ]; then
### Install Ansible Galaxy and dependencies if missing
if ! command -v ansible-galaxy > /dev/null; then
if ! command -v pipx > /dev/null; then
logg info 'Installing pipx via Homebrew'
brew install pipx
logg info 'Running `pipx ensurepath`'
logg info 'Running pipx ensurepath'
pipx ensurepath
fi
logg info 'Installing `ansible-core` via pipx'
logg info 'Installing ansible-core via pipx'
pipx install ansible-core
if [ -d /Applications ] && [ -d /System ]; then
logg info 'Injecting macOS-specific pipx dependencies via pipx'
@ -110,19 +110,19 @@ if [ -f "$HOME/.local/src/gas-station/requirements.yml" ]; then
ansible-galaxy install -r "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/requirements.yml" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Failed to install Ansible requirements from Ansible Galaxy'
if [ -d "$HOME/.local/src/gas-station/collections" ]; then
if [ -d "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections" ]; then
logg info 'Attempting to use locally stored Ansible requirements'
cd "$HOME/.local/src/gas-station/collections"
cd "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections"
ansible-galaxy install -r requirements.yml || SECOND_EXIT_CODE=$?
if [ -n "$SECOND_EXIT_CODE" ]; then
logg error 'Failed to install requirements from both the cloud and the local copy' && exit 1
fi
else
logg warn '~/.local/src/gas-station/collections is missing'
logg warn "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/collections is missing"
fi
fi
else
logg warn 'Unable to install the Ansible Galaxy requirements.yml since the ansible-galaxy executable is missing from the PATH'
logg warn 'Unable to install the Ansible Galaxy requirements.yml since the ansible-galaxy executable is missing from the PATH"
fi
else
logg warn '~/.local/share/ansible/requirements.yml is missing'

View file

@ -63,9 +63,9 @@ if command -v install-program > /dev/null; then
# TODO - Figure out how to configure no logs to print to ~/.ansible.log -- should be printing to the value specified in the ansible.cfg
rm -rf "$HOME/.ansible.log"
else
logg error '`zx` is not available'
logg error 'zx is not available'
fi
else
logg error '`install-program` is not in the PATH. It should be located in ~/.local/bin.'
logg error 'install-program is not in the PATH. It should be located in ~/.local/bin.'
fi
```

View file

@ -43,7 +43,7 @@ if command -v keybase > /dev/null; then
logg warn "No Keybase config located at $KEYBASE_CONFIG"
fi
else
logg info 'The `keybase` executable is not available'
logg info 'The keybase executable is not available'
fi
{{ end -}}

View file

@ -40,7 +40,7 @@ if command -v timeshift > /dev/null; then
logg info "Copying $TIMESHIFT_CONFIG to /etc/timeshift/timeshift.json"
sudo cp -f "$TIMESHIFT_CONFIG" /etc/timeshift/timeshift.json
else
logg info 'The `timeshift` executable is not available'
logg info 'The timeshift executable is not available'
fi
{{ end -}}

View file

@ -118,7 +118,7 @@ if [[ ! "$(test -d /proc && grep Microsoft /proc/version > /dev/null)" ]]; then
### This is made for CentOS 8 and works on Fedora 36 (hopefully 36+ as well) with `nss-tools` as a dependency
sudo dnf instal -y nss-tools || NSS_TOOL_EXIT=$?
if [ -n "$NSS_TOOL_EXIT" ]; then
logg warn 'Unable to install `nss-tools` which was a requirement on Fedora 36 and assumed to be one on other systems as well.'
logg warn 'Unable to install nss-tools which was a requirement on Fedora 36 and assumed to be one on other systems as well.'
fi
### According to the download site, this is the only version available for RedHat-based systems
sudo rpm -ivh https://pkg.cloudflareclient.com/cloudflare-release-el8.rpm || RPM_EXIT_CODE=$?
@ -139,7 +139,7 @@ if [ -d /System ] && [ -d /Applications ] && command -v warp-cli > /dev/null; th
if [ -f /usr/local/etc/ca-certificates/cert.pem ]; then
echo | sudo cat - "$HOME/.local/etc/ssl/cloudflare/Cloudflare_CA.pem" >> /usr/local/etc/ca-certificates/cert.pem
else
logg error 'Unable to add `Cloudflare_CA.pem` because `/usr/local/etc/ca-certificates/cert.pem` does not exist!' && exit 1
logg error 'Unable to add Cloudflare_CA.pem because /usr/local/etc/ca-certificates/cert.pem does not exist!' && exit 1
fi
fi
@ -172,7 +172,7 @@ if command -v warp-cli > /dev/null; then
logg info 'Already connected to CloudFlare WARP'
fi
else
logg warn '`warp-cli` was not installed so CloudFlare Zero Trust cannot be joined'
logg warn 'warp-cli was not installed so CloudFlare Zero Trust cannot be joined'
fi
{{ end -}}
```

View file

@ -38,22 +38,22 @@ if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then
logg info 'Sourcing asdf.sh'
. ${ASDF_DIR}/asdf.sh
cat .tool-versions | while read TOOL; do
logg info 'Installing ASDF plugin `'"$(echo "$TOOL" | sed 's/ .*//')"'`'
logg info 'Installing ASDF plugin '"$(echo "$TOOL" | sed 's/ .*//')"''
asdf plugin add "$(echo "$TOOL" | sed 's/ .*//')"
done
# Only proceed with installation if either DEBUG_MODE is enabled or ~/.cache/megabyte-labs/asdf-install is missing
# Added to save time between tests because PHP takes awhile to install
if [ "$DEBUG_MODE" == 'true' ] || [ ! -f "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs/asdf-install" ]; then
logg info 'Installing ASDF dependencies derived from `~/.tool-versions` via `asdf install`'
logg info 'Installing ASDF dependencies derived from ~/.tool-versions via asdf install'
asdf install || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing the ASDF plugins specified in `~/.tool-versions`'
logg error 'Error installing the ASDF plugins specified in ~/.tool-versions'
fi
mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs"
touch "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs/asdf-install"
fi
else
logg warn 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present'
logg warn 'The $ASDF_DIR/asdf.sh or ~/.tool-versions file is not present'
fi
{{ end -}}

View file

@ -33,10 +33,10 @@ website](https://sdkman.io/).
### Ensure SDKMan is installed (https://sdkman.io/)
if [ ! -d "$SDKMAN_DIR" ]; then
logg info 'Installing SDKMan via `curl -s "https://get.sdkman.io?rcupdate=false`'
logg info 'Installing SDKMan via curl -s "https://get.sdkman.io?rcupdate=false'
logg info "Install directory: $SDKMAN_DIR"
curl -s "https://get.sdkman.io?rcupdate=false" | bash
logg info 'Running `sdk install java`'
logg info 'Running sdk install java'
sdk install java
else
logg info 'SDKMan appears to already be installed.'

View file

@ -65,7 +65,7 @@ if [ -f "$HOME/.config/desktop/gnome.yml" ]; then
done
done
else
logg warn 'The `~/.config/desktop/gnome.yml` file is missing so GNOME extension install orders cannot be calculated'
logg warn 'The ~/.config/desktop/gnome.yml file is missing so GNOME extension install orders cannot be calculated'
fi
### Remove /tmp/install-gnome-extensions.txt if it is empty
@ -76,7 +76,7 @@ fi
### Install the GNOME extensions using the `install-gnome-extensions` script
if command -v install-gnome-extensions > /dev/null; then
if [ -f /tmp/install-gnome-extensions.txt ]; then
logg info 'Running the `install-gnome-extensions` script'
logg info 'Running the install-gnome-extensions script'
cd /tmp
install-gnome-extensions --enable --overwrite --file /tmp/install-gnome-extensions.txt
rm -f /tmp/install-gnome-extensions.txt
@ -85,7 +85,7 @@ if command -v install-gnome-extensions > /dev/null; then
logg info 'No new GNOME extensions to install'
fi
else
logg warn 'Cannot install GNOME extensions because the `install-gnome-extensions` script is missing from ~/.local/bin'
logg warn 'Cannot install GNOME extensions because the install-gnome-extensions script is missing from ~/.local/bin'
fi
### Apply plugin gsettings
@ -106,7 +106,7 @@ if [ -f "$HOME/.config/desktop/gnome.yml" ]; then
EXT_SETTINGS_TYPE="$(cat "$TMP" | jq -r '.settings | type')"
EXT_SETTINGS="$(cat "$TMP" | jq -r '.settings')"
if [ "$EXT_SETTINGS" != 'null' ]; then
logg info 'Evaluating extension settings for `'"$EXT_ID"'`'
logg info 'Evaluating extension settings for '"$EXT_ID"''
if [ "$EXT_SETTINGS_TYPE" == 'array' ]; then
cat "$TMP" | jq -r '.settings[]' | while read EXT_SETTING; do
logg info 'Applying following extension setting:'
@ -118,7 +118,7 @@ if [ -f "$HOME/.config/desktop/gnome.yml" ]; then
echo "$EXT_SETTINGS"
eval "$EXT_SETTINGS"
fi
logg success 'Applied gsettings configuration for the `'"$EXT_ID"'` GNOME extension'
logg success 'Applied gsettings configuration for the '"$EXT_ID"' GNOME extension'
fi
done
fi

View file

@ -63,7 +63,7 @@ if command -v squash-symlink > /dev/null; then
logg info 'Converting /usr/local/share/grub symlinks to equivalent regular files'
sudo find /usr/local/share/grub -type l -exec squash-symlink {} +
else
logg warn '`squash-symlink` is not a script in the PATH'
logg warn 'squash-symlink is not a script in the PATH'
fi
### Ensure /usr/share/backgrounds/default.png is deleted
@ -97,7 +97,7 @@ if [ -f '/usr/local/share/plymouth/themes/{{ .theme }}/icons/{{ .host.distro.id
sudo cp -f '/usr/local/share/plymouth/themes/{{ .theme }}/icons/{{ .host.distro.id }}.png' '/usr/local/share/plymouth/themes/{{ .theme }}/icon.png'
logg success 'Added platform-specific icon to {{ .theme }} Plymouth theme'
else
logg warn 'The `{{ .host.distro.id }}.png` icon is not available in the icons folder insider the {{ .theme }} Plymouth theme'
logg warn 'The {{ .host.distro.id }}.png icon is not available in the icons folder insider the {{ .theme }} Plymouth theme'
fi
{{ end -}}

View file

@ -51,7 +51,7 @@ if [ -d /etc/fonts ]; then
logg info 'Copying ~/.config/fontconfig/fonts.conf to /etc/fonts/local.conf'
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/fontconfig/fonts.conf" /etc/fonts/local.conf
else
logg warn 'The `/etc/fonts` directory is missing'
logg warn 'The /etc/fonts directory is missing'
fi
{{ end -}}

View file

@ -64,12 +64,12 @@ if [ -d "$XDG_CONFIG_HOME/dconf/settings" ]; then
fi
# Reset dconf settings if environment variable RESET_DCONF is set to true
if [ "$RESET_DCONF" == 'true' ]; then
logg info 'Resetting dconf settings for `'"$DCONF_SETTINGS_ID"'`'
logg info 'Resetting dconf settings for '"$DCONF_SETTINGS_ID"''
dconf reset -f "$DCONF_SETTINGS_ID"
fi
logg info 'Loading versioned dconf settings for `'"$DCONF_SETTINGS_ID"'`'
logg info 'Loading versioned dconf settings for '"$DCONF_SETTINGS_ID"''
dconf load "$DCONF_SETTINGS_ID" < "$DCONF_CONFIG_FILE"
logg success 'Finished applying dconf settings for `'"$DCONF_SETTINGS_ID"'`'
logg success 'Finished applying dconf settings for '"$DCONF_SETTINGS_ID"''
done
else
logg warn '~/.config/dconf/settings does not exist!'

View file

@ -35,7 +35,7 @@ This script ensures the macOS desktop wallpaper is set to the macOS Betelgeuse w
if command -v m > /dev/null && [ -f "$HOME/.local/src/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png" ]; then
m wallpaper "$HOME/.local/src/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png"
else
logg warn 'Either `m` or the macOS default wallpaper is missing.'
logg warn 'Either m or the macOS default wallpaper is missing.'
fi
{{ end -}}
```

View file

@ -75,7 +75,7 @@ fi
# @description Ensures the `/etc/wireguard` directory exists and has the lowest possible permission-level
if [ ! -d /etc/wireguard ]; then
logg info 'Creating `/etc/wireguard` since it does not exist yet'
logg info 'Creating /etc/wireguard since it does not exist yet'
sudo mkdir -p /etc/wireguard
sudo chmod 600 /etc/wireguard
fi
@ -83,7 +83,7 @@ fi
# @description Cycles through the `*.conf` files in `${XDG_CONFIG_HOME:-$HOME/.config}/vpn` and adds them to the `/etc/wireguard` folder
find "${XDG_CONFIG_HOME:-$HOME/.config}/vpn" -mindepth 1 -maxdepth 1 -type f -name "*.conf" | while read WG_CONF; do
WG_FILE="$(basename "$WG_CONF")"
logg info 'Adding `'"$WG_FILE"'` to /etc/wireguard'
logg info 'Adding '"$WG_FILE"' to /etc/wireguard'
sudo cp -f "$WG_CONF" "/etc/wireguard/$WG_FILE"
done

View file

@ -120,7 +120,7 @@ if command -v nmcli > /dev/null; then
done
else
logg info 'Either the OpenVPN username or password is undefined.'
logg info 'See the `docs/VARIABLES.md` file for details.'
logg info 'See the docs/VARIABLES.md file for details.'
fi
{{ if (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) }}
@ -129,8 +129,8 @@ if command -v nmcli > /dev/null; then
find "${XDG_CONFIG_HOME:-$HOME/.config}/vpn" -type f -name "*.nmconnection" | while read WG_FILE; do
# @description Ensure the WireGuard NetworkManager plugin is available
if [ ! -d /usr/lib/NetworkManager/nm-wireguard-service ]; then
logg info 'The `nm-wireguard-service` is not present'
logg info 'Installing the `nm-wireguard-service`'
logg info 'The nm-wireguard-service is not present'
logg info 'Installing the nm-wireguard-service'
fi
# @description Add the WireGuard profiles
@ -158,7 +158,7 @@ if command -v nmcli > /dev/null; then
sudo service NetworkManager restart
fi
else
logg warn '`nmcli` is unavailable'
logg warn 'nmcli is unavailable'
fi
{{ end -}}```

View file

@ -87,15 +87,15 @@ if command -v code > /dev/null; then
EXTENSIONS="$(code --list-extensions)"
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
logg info 'Installing Visual Studio Code extension `'"$EXTENSION"'`'
logg info 'Installing Visual Studio Code extension '"$EXTENSION"''
code --install-extension "$EXTENSION"
logg success 'Installed `'"$EXTENSION"'`'
logg success 'Installed '"$EXTENSION"''
else
logg info '`'"$EXTENSION"'` already installed'
logg info ''"$EXTENSION"' already installed'
fi
done
else
logg warn '`code` executable not available'
logg warn 'code executable not available'
fi
# @description Check for the presence of the `codium` command in the `PATH` and install extensions for VSCodium if it is present
@ -103,15 +103,15 @@ if command -v codium > /dev/null; then
EXTENSIONS="$(codium --list-extensions)"
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
logg info 'Installing VSCodium extension `'"$EXTENSION"'`'
logg info 'Installing VSCodium extension '"$EXTENSION"''
codium --install-extension "$EXTENSION"
logg success 'Installed `'"$EXTENSION"'`'
logg success 'Installed '"$EXTENSION"''
else
logg info '`'"$EXTENSION"'` already installed'
logg info ''"$EXTENSION"' already installed'
fi
done
else
logg warn '`codium` executable not available'
logg warn 'codium executable not available'
fi
{{ end -}}

View file

@ -86,7 +86,7 @@ if command -v toron > /dev/null; then
logg warn 'The '"$TORRC_CONFIG_DIR"' directory is missing'
fi
else
logg warn '`toron` is missing from the PATH'
logg warn 'toron is missing from the PATH'
fi
{{ end -}}

View file

@ -84,7 +84,7 @@ if command -v privoxy > /dev/null; then
logg warn 'The '"$PRIVOXY_CONFIG_DIR"' directory is missing'
fi
else
logg warn '`privoxy` is missing from the PATH'
logg warn 'privoxy is missing from the PATH'
fi
{{ end -}}

View file

@ -79,20 +79,20 @@ is assigned to a non-standard port like 2214. This allows the default port to be
### Configures endlessh service
function configureEndlessh() {
### Update the service configuration file
logg info 'Updating `endlessh` service configuration file'
logg info 'Updating endlessh service configuration file'
sudo sed -i 's/^.*#AmbientCapabilities=CAP_NET_BIND_SERVICE/AmbientCapabilities=CAP_NET_BIND_SERVICE/' /usr/lib/systemd/system/endlessh.service
sudo sed -i 's/^.*PrivateUsers=true/#PrivateUsers=true/' /usr/lib/systemd/system/endlessh.service
logg info 'Reloading systemd'
sudo systemctl daemon-reload
### Update capabilities of `endlessh`
logg info 'Updating capabilities of `endlessh`'
logg info 'Updating capabilities of endlessh'
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/endlessh
### Restart / enable Endlessh
logg info 'Enabling the `endlessh` service'
logg info 'Enabling the endlessh service'
sudo systemctl enable endlessh
logg info 'Restarting the `endlessh` service'
logg info 'Restarting the endlessh service'
sudo systemctl restart endlessh
}
@ -105,9 +105,9 @@ if [[ ! "$(test -d proc && grep Microsoft /proc/version > /dev/null)" ]]; then
configureEndlessh || CONFIGURE_EXIT_CODE=$?
if [ -n "$CONFIGURE_EXIT_CODE" ]; then
logg error 'Configuring `endlessh` service failed' && exit 1
logg error 'Configuring endlessh service failed' && exit 1
else
logg success 'Successfully configured `endlessh` service'
logg success 'Successfully configured endlessh service'
fi
elif [ -f /etc/endlessh.conf ]; then
logg info 'Copying ~/.ssh/endlessh/config to /etc/endlessh.conf'
@ -115,15 +115,15 @@ if [[ ! "$(test -d proc && grep Microsoft /proc/version > /dev/null)" ]]; then
configureEndlessh || CONFIGURE_EXIT_CODE=$?
if [ -n "$CONFIGURE_EXIT_CODE" ]; then
logg error 'Configuring `endlessh` service failed' && exit 1
logg error 'Configuring endlessh service failed' && exit 1
else
logg success 'Successfully configured `endlessh` service'
logg success 'Successfully configured endlessh service'
fi
else
logg warn 'Neither the /etc/endlessh folder nor the /etc/endlessh.conf file exist'
fi
else
logg info 'Skipping Endlessh configuration because the `endlessh` executable is not available in the PATH'
logg info 'Skipping Endlessh configuration because the endlessh executable is not available in the PATH'
fi
else
logg info 'Skipping Endlessh configuration since environment is WSL'

View file

@ -62,15 +62,15 @@ if [[ ! "$(test -d /proc && grep Microsoft /proc/version > /dev/null)" ]]; then
### Restart SSH server
if [ -d /Applications ] && [ -d /System ]; then
# macOS
logg info 'Running `sudo launchctl stop com.openssh.sshd`'
logg info 'Running sudo launchctl stop com.openssh.sshd'
sudo launchctl stop com.openssh.sshd
logg info 'Running `sudo launchctl start com.openssh.sshd`'
logg info 'Running sudo launchctl start com.openssh.sshd'
sudo launchctl start com.openssh.sshd
else
# Linux
logg info 'Enabling the `sshd` service'
logg info 'Enabling the sshd service'
sudo systemctl enable sshd
logg info 'Restarting the `sshd` service'
logg info 'Restarting the sshd service'
sudo systemctl restart sshd
fi
else

View file

@ -50,13 +50,13 @@ the `fail2ban` configuration.
function restartFail2Ban() {
if [ -d /Applications ] && [ -d /System ]; then
# macOS
logg info 'Enabling the `fail2ban` Homebrew service'
logg info 'Enabling the fail2ban Homebrew service'
brew services start fail2ban
else
# Linux
logg info 'Enabling the `fail2ban` service'
logg info 'Enabling the fail2ban service'
sudo systemctl enable fail2ban
logg info 'Restarting the `fail2ban` service'
logg info 'Restarting the fail2ban service'
sudo systemctl restart fail2ban
fi
}

View file

@ -363,13 +363,13 @@ for SETTINGS_DIR in "$HOME/snap/firefox/common/.mozilla/firefox" "$HOME/.var/app
# to the user profile.
# logg info 'Unzipping '"$PLUGIN_FILENAME"' ('"$FIREFOX_PLUGIN"')'
# unzip "$SETTINGS_DIR/$SETTINGS_PROFILE/extensions/$PLUGIN_FILENAME" -d "$SETTINGS_DIR/$SETTINGS_PROFILE/extensions/$PLUGIN_FOLDER"
logg success 'Installed `'"$FIREFOX_PLUGIN"'`'
logg success 'Installed '"$FIREFOX_PLUGIN"''
fi
else
logg warn 'A null Firefox add-on filename was detected for `'"$FIREFOX_PLUGIN"'`'
logg warn 'A null Firefox add-on filename was detected for '"$FIREFOX_PLUGIN"''
fi
else
logg warn 'A null Firefox add-on ID was detected for `'"$FIREFOX_PLUGIN"'`'
logg warn 'A null Firefox add-on ID was detected for '"$FIREFOX_PLUGIN"''
fi
done
fi

View file

@ -61,12 +61,12 @@ if command -v vagrant > /dev/null && command -v vmware > /dev/null; then
else
logg info 'Generating Vagrant VMWare Utility certificates'
sudo vagrant-vmware-utility certificate generate
logg success 'Generated Vagrant VMWare Utility certificates via `vagrant-vmware-utility certificate generate`'
logg success 'Generated Vagrant VMWare Utility certificates via vagrant-vmware-utility certificate generate'
fi
logg info 'Ensuring the Vagrant VMWare Utility service is enabled'
sudo vagrant-vmware-utility service install || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg info 'The Vagrant VMWare Utility command `vagrant-vmware-utility service install` failed. It is probably already setup.'
logg info 'The Vagrant VMWare Utility command vagrant-vmware-utility service install failed. It is probably already setup.'
fi
fi
else

View file

@ -37,7 +37,7 @@ if command -v vmware > /dev/null; then
### Build VMWare host modules
logg info 'Building VMware host modules'
if sudo vmware-modconfig --console --install-all; then
logg success 'Built VMWare host modules successfully with `sudo vmware-modconfig --console --install-all`'
logg success 'Built VMWare host modules successfully with sudo vmware-modconfig --console --install-all'
else
logg info 'Acquiring VMware version from CLI'
VMW_VERSION="$(vmware --version | cut -f 3 -d' ')"
@ -47,7 +47,7 @@ if command -v vmware > /dev/null; then
curl -sSL "https://github.com/mkubecek/vmware-host-modules/archive/workstation-$VMW_VERSION.tar.gz" -o /tmp/vmw_patch/workstation.tar.gz
tar -xzf /tmp/vmw_patch/workstation.tar.gz
cd vmware*
logg info 'Running `sudo make` and `sudo make install`'
logg info 'Running sudo make and sudo make install'
sudo make
sudo make install
logg success 'Successfully configured VMware host module patches'
@ -84,22 +84,22 @@ if command -v vmware > /dev/null; then
if [[ ! "$(test -d /proc && grep Microsoft /proc/version > /dev/null)" ]]; then
### Start / enable VMWare service
logg info 'Ensuring `vmware.service` is enabled and running'
logg info 'Ensuring vmware.service is enabled and running'
sudo systemctl enable vmware.service
sudo systemctl restart vmware.service
### Start / enable VMWare Workstation Server service
logg info 'Ensuring `vmware-workstation-server.service` is enabled and running'
logg info 'Ensuring vmware-workstation-server.service is enabled and running'
sudo systemctl enable vmware-workstation-server.service
sudo systemctl restart vmware-workstation-server.service
### Start / enable VMWare USB Arbitrator service
if command -v vmware-usbarbitrator.service > /dev/null; then
logg info 'Ensuring `vmware-usbarbitrator.service` is enabled and running'
logg info 'Ensuring vmware-usbarbitrator.service is enabled and running'
sudo systemctl enable vmware-usbarbitrator.service
sudo systemctl restart vmware-usbarbitrator.service
else
logg warn '`vmware-usbarbitrator` does not exist in the PATH'
logg warn 'vmware-usbarbitrator does not exist in the PATH'
fi
fi
else

View file

@ -163,7 +163,7 @@ if command -v rclone > /dev/null; then
sudo systemctl restart "s3-${USER}"
fi
else
logg info '`rclone` is not available'
logg info 'rclone is not available'
fi
{{ end -}}

View file

@ -154,7 +154,7 @@ if command -v smbd > /dev/null; then
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/samba/config" "/etc/samba/smb.conf"
### Reload configuration file changes
logg info 'Reloading the `smbd` config'
logg info 'Reloading the smbd config'
smbcontrol smbd reload-config
fi
else

View file

@ -110,9 +110,9 @@ The following chart provides a short description of the default plugins that are
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json" ]; then
if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/node_modules" ]; then
logg info 'Skipping Tabby plugin installation because it looks like the plugins were already installed since `node_modules` is present in ~/.config/tabby/plugins'
logg info 'Skipping Tabby plugin installation because it looks like the plugins were already installed since node_modules is present in ~/.config/tabby/plugins'
else
logg info 'Installing Tabby plugins defined in `'"${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json"'`'
logg info 'Installing Tabby plugins defined in '"${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json"''
cd "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins"
npm install
logg success 'Finished installing Tabby plugins'

View file

@ -50,16 +50,16 @@ if command -v netdata-claim.sh > /dev/null; then
else
# Linux
if [ -d /sys/kernel/mm/ksm ]; then
logg info 'Adding Netdata kernel optimization for `/sys/kernel/mm/ksm/run`'
logg info 'Adding Netdata kernel optimization for /sys/kernel/mm/ksm/run'
echo 1 | sudo tee /sys/kernel/mm/ksm/run
logg info 'Adding Netdata kernel optimization for `/sys/kernel/mm/ksm/sleep_millisecs`'
logg info 'Adding Netdata kernel optimization for /sys/kernel/mm/ksm/sleep_millisecs'
echo 1000 | sudo tee /sys/kernel/mm/ksm/sleep_millisecs
else
logg info 'The `/sys/kernel/mm/ksm` directory does not exist so Netdata kernel optimizations are not being applied'
logg info 'The /sys/kernel/mm/ksm directory does not exist so Netdata kernel optimizations are not being applied'
fi
fi
else
logg warn '`netdata-claim.sh` is not available in the PATH'
logg warn 'netdata-claim.sh is not available in the PATH'
fi
{{ end -}}

View file

@ -36,11 +36,11 @@ network if the `TAILSCALE_AUTH_KEY` variable is provided.
if [ -d /Applications ] && [ -d System ]; then
# macOS
if command -v tailscaled > /dev/null; then
logg info 'Ensuring `tailscaled` system daemon is installed'
logg info 'Ensuring tailscaled system daemon is installed'
sudo tailscaled install-system-daemon
logg info '`tailscaled` system daemon is now installed and will load on boot'
logg info 'tailscaled system daemon is now installed and will load on boot'
else
logg info '`tailscaled` does not appear to be installed'
logg info 'tailscaled does not appear to be installed'
fi
fi
@ -50,7 +50,7 @@ if command -v tailscale > /dev/null && [ "$TAILSCALE_AUTH_KEY" != "" ]; then
logg info 'Connecting to Tailscale with user-defined authentication key'
timeout 14 tailscale up --authkey="$TAILSCALE_AUTH_KEY" --accept-routes || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg warn '`tailscale up` timed out'
logg warn 'tailscale up timed out'
else
logg success 'Connected to Tailscale network'
fi

View file

@ -53,15 +53,15 @@ fi
if command -v update-alternatives > /dev/null; then
if [ -f "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" ]; then
sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" 100
logg success 'Installed `default.plymouth`'
logg success 'Installed default.plymouth'
# Required sometimes
sudo update-alternatives --set default.plymouth "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth"
logg success 'Set `default.plymouth`'
logg success 'Set default.plymouth'
else
logg warn "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth does not exist!"
fi
else
logg warn '`update-alternatives` is not available'
logg warn 'update-alternatives is not available'
fi
### Update /etc/plymouth/plymouthd.conf
@ -87,12 +87,12 @@ fi
if command -v plymouth-set-default-theme > /dev/null; then
sudo plymouth-set-default-theme -R '{{ .theme }}' || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg warn 'There may have been an issue while setting the Plymouth default theme with `plymouth-set-default-theme`'
logg warn 'There may have been an issue while setting the Plymouth default theme with plymouth-set-default-theme'
else
logg success 'Set Plymouth default theme with `plymouth-set-default-theme`'
logg success 'Set Plymouth default theme with plymouth-set-default-theme'
fi
else
logg warn 'Could not apply default Plymouth theme because `plymouth-set-default-theme` is missing'
logg warn 'Could not apply default Plymouth theme because plymouth-set-default-theme is missing'
fi
### Apply update-alternatives (again - required sometimes)
@ -100,27 +100,27 @@ if command -v update-alternatives > /dev/null; then
if [ -f "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" ]; then
# Required sometimes
sudo update-alternatives --set default.plymouth "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth"
logg success 'Set `default.plymouth` (second time is required sometimes)'
logg success 'Set default.plymouth (second time is required sometimes)'
else
logg warn "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth does not exist!"
fi
else
logg warn '`update-alternatives` is not available'
logg warn 'update-alternatives is not available'
fi
### Update kernel / initrd images
# Set `export DEBUG_MODE=true` to bypass GRUB2 / Plymouth application
if [ "$DEBUG_MODE" != 'true' ]; then
if command -v update-initramfs > /dev/null; then
logg info 'Running `sudo update-initramfs -u`'
logg info 'Running sudo update-initramfs -u'
sudo update-initramfs -u
logg success 'Updated kernel / initrd images for Plymouth'
elif command -v dracut > /dev/null; then
logg info 'Running `sudo dracut --regenerate-all -f`'
logg info 'Running sudo dracut --regenerate-all -f'
sudo dracut --regenerate-all -f
logg success 'Updated kernel / initrd images for Plymouth'
else
logg warn 'Unable to update kernel / initrd images because neither `update-initramfs` or `dracut` are available'
logg warn 'Unable to update kernel / initrd images because neither update-initramfs or dracut are available'
fi
fi

View file

@ -197,7 +197,7 @@ if [ "$DEBUG_MODE" != 'true' ]; then
logg success 'Applied GRUB2 theme'
fi
elif [ -f /usr/sbin/update-grub ]; then
logg info 'Running `sudo update-grub`'
logg info 'Running sudo update-grub'
sudo update-grub
else
logg warn 'Unable to find appropriate GRUB mkconfig command'

View file

@ -35,7 +35,7 @@ This script houses bug fixes that do not yet have their own script file.
### Remove Ubuntu logo branding from GDM lock screen
if [ '{{ .whiteLabel }}' == 'true' ]; then
if [ -f /usr/share/plymouth/ubuntu-logo.png ]; then
logg info 'Renaming `/usr/share/plymouth/ubuntu-logo.png` to `/usr/share/plymouth/ubuntu-logo.png.bak` since the whiteLabel setting is true'
logg info 'Renaming /usr/share/plymouth/ubuntu-logo.png to /usr/share/plymouth/ubuntu-logo.png.bak since the whiteLabel setting is true'
sudo mv /usr/share/plymouth/ubuntu-logo.png /usr/share/plymouth/ubuntu-logo.png.bak
fi
fi
@ -60,7 +60,7 @@ if command -v rsync > /dev/null; then
logg warn 'Skipping synchronization of Candy icons since either the target or destination folder is not present'
fi
else
logg warn '`rsync` is missing from the system!'
logg warn 'rsync is missing from the system!'
fi
### Move ~/.gnome/apps/* to ~/.local/share/applications
@ -170,7 +170,7 @@ find /var/lib/snapd/desktop/applications -mindepth 1 -maxdepth 1 -name "*.deskto
else
SNAP_ICON="${DESKTOP_FILE_BASE}"
fi
logg info 'Setting the .desktop shortcut Icon value equal to `'"$SNAP_ICON"'`'
logg info 'Setting the .desktop shortcut Icon value equal to '"$SNAP_ICON"''
sed -i 's/^Icon=.*$/Icon='"$SNAP_ICON"'/' "${XDG_DATA_HOME:-$HOME/.local/share}/applications/${DESKTOP_FILE_BASE}.desktop"
else
logg info "${XDG_DATA_HOME:-$HOME/.local/share}/applications/${DESKTOP_FILE_BASE}.desktop already exists!"

View file

@ -35,7 +35,7 @@ conditionally adds the completions to the Bash completions folder.
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
logg 'Updating the `~/.local/share/bash-completion/completions` folder based on the installed applications'
logg 'Updating the ~/.local/share/bash-completion/completions folder based on the installed applications'
if [ "$DEBUG_MODE" == 'true' ]; then
set +x

View file

@ -42,15 +42,15 @@ export DIGITALOCEAN_ACCESS_TOKEN="{{ if (stat (joinPath .chezmoi.sourceDir ".che
if [ -n "$DIGITALOCEAN_ACCESS_TOKEN" ] && [ -n '{{ .user.digitalOceanClusterId }}' ]; then
### Ensure DigitalOcean CLI is instaled
if ! command -v doctl > /dev/null; then
logg info '`doctl` is missing - installing via Homebrew'
logg info 'doctl is missing - installing via Homebrew'
brew install doctl
fi
### Connect to the k8s cluster with `doctl`
logg info 'Connecting to the DigitalOcean k8s cluster with `doctl`'
logg info 'Connecting to the DigitalOcean k8s cluster with doctl'
doctl kubernetes cluster kubeconfig save {{ .user.digitalOceanClusterId }}
else
logg info 'Skipping connecting to the DigitalOcean k8s cluster because either the `DIGITALOCEAN_ACCESS_TOKEN` or the `.user.digitalOceanClusterId` is not defined'
logg info 'Skipping connecting to the DigitalOcean k8s cluster because either the DIGITALOCEAN_ACCESS_TOKEN or the .user.digitalOceanClusterId is not defined'
fi
{{ end -}}

View file

@ -38,9 +38,9 @@ fi
### Bash-it completions / plugins
if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then
logg info 'Running `source ~/.bashrc`'
logg info 'Running source ~/.bashrc'
source ~/.bashrc
logg success 'Imported the `~/.bashrc` profile'
logg success 'Imported the ~/.bashrc profile'
if command -v bash-it > /dev/null; then
if [ -n "$BASH_IT" ]; then
cd "$BASH_IT" || logg warn "The $BASH_IT directory does not exist"
@ -53,13 +53,13 @@ if command -v powerline > /dev/null && [ -f "$HOME/.bashrc" ]; then
logg warn 'The BASH_IT variable needs to be defined'
fi
else
logg warn '`bash-it` is not available'
logg warn 'bash-it is not available'
fi
else
if ! command -v powerline > /dev/null; then
logg warn '`powerline` is not available'
logg warn 'powerline is not available'
else
logg warn '`~/.bashrc` is missing'
logg warn '~/.bashrc is missing'
fi
fi

View file

@ -38,7 +38,7 @@ as cache-building are handled ahead of time.
### 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`'
logg info 'Bootstrapping ZSH by running exec zsh'
exec zsh
fi
{{ end -}}

View file

@ -45,10 +45,10 @@ Regardless of whether or not this script runs, you can access the provisioning l
### Restart GNOME if `HEADLESS_INSTALL` is defined and `gnome-shell` is available
if [ -n "$HEADLESS_INSTALL" ] && command -v gnome-shell > /dev/null; then
logg info 'Reloading `gnome-shell`'
logg info 'Reloading gnome-shell'
killall -3 gnome-shell
else
logg info 'Manually reload `gnome-shell` to see changes'
logg info 'Manually reload gnome-shell to see changes'
fi
{{ end -}}

View file

@ -76,10 +76,10 @@ if [ -z "$HEADLESS_INSTALL" ]; then
### Install Age via Homebrew if not present
if ! command -v age > /dev/null; then
if command -v brew > /dev/null; then
logg info 'Running `brew install age`'
logg info 'Running brew install age'
brew install age
else
logg warn '`age` is not installed which is utilized in the decryption process'
logg warn 'age is not installed which is utilized in the decryption process'
fi
fi
@ -87,10 +87,10 @@ if [ -z "$HEADLESS_INSTALL" ]; then
if command -v age > /dev/null; then
if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
mkdir -p "${XDG_CONFIG_HOME}/age"
logg star '`PRESS ENTER` if you have not set up your encryption token yet'
logg star 'PRESS ENTER if you have not set up your encryption token yet'
age --decrypt --output "${XDG_CONFIG_HOME}/age/chezmoi.txt" "{{ .chezmoi.sourceDir }}/key.txt.age" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg info 'Proceeding without decrypting age encryption key stored at `~/.local/share/chezmoi/home/key.txt.age`'
logg info 'Proceeding without decrypting age encryption key stored at ~/.local/share/chezmoi/home/key.txt.age'
logg info 'To have Chezmoi handle your encryption (so you can store your private files publicly) take a look at https://shorturl.at/jkpzG'
logg info 'Removing all files that begin with encrypted_ because decryption failed'
find "$HOME/.local/share/chezmoi" -type f -name "encrypted_*" | while read ENCRYPTED_FILE; do

View file

@ -76,10 +76,10 @@ if [ -z "$HEADLESS_INSTALL" ]; then
### Install Age via Homebrew if not present
if ! command -v age > /dev/null; then
if command -v brew > /dev/null; then
logg info 'Running `brew install age`'
logg info 'Running brew install age'
brew install age
else
logg warn '`age` is not installed which is utilized in the decryption process'
logg warn 'age is not installed which is utilized in the decryption process'
fi
fi
@ -87,10 +87,10 @@ if [ -z "$HEADLESS_INSTALL" ]; then
if command -v age > /dev/null; then
if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
mkdir -p "${XDG_CONFIG_HOME}/age"
logg star '`PRESS ENTER` if you have not set up your encryption token yet'
logg star 'PRESS ENTER if you have not set up your encryption token yet'
age --decrypt --output "${XDG_CONFIG_HOME}/age/chezmoi.txt" "{{ .chezmoi.sourceDir }}/key.txt.age" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg info 'Proceeding without decrypting age encryption key stored at `~/.local/share/chezmoi/home/key.txt.age`'
logg info 'Proceeding without decrypting age encryption key stored at ~/.local/share/chezmoi/home/key.txt.age'
logg info 'To have Chezmoi handle your encryption (so you can store your private files publicly) take a look at https://shorturl.at/jkpzG'
logg info 'Removing all files that begin with encrypted_ because decryption failed'
find "$HOME/.local/share/chezmoi" -type f -name "encrypted_*" | while read ENCRYPTED_FILE; do

View file

@ -40,19 +40,19 @@ where `$DISTRO_ID` is equal to the Linux distribution ID found in `/etc/os-relea
if [ '{{ .host.distro.id }}' = 'archlinux' ]; then
### Print dependency list
logg 'Installing common dependencies using `pacman`'
logg 'Installing common dependencies using pacman'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
logg info 'Checking for presence of '"$PACKAGE"''
if pacman -Qs "$PACKAGE" > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'
logg info 'Installing '"$PACKAGE"''
sudo pacman -Sy --noconfirm --needed "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via pacman'
logg error 'Error installing '"$PACKAGE"' via pacman'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
@ -61,10 +61,10 @@ if [ '{{ .host.distro.id }}' = 'archlinux' ]; then
### Install yay
if ! command -v yay > /dev/null; then
logg info 'Cloning yay from `https://aur.archlinux.org/yay.git` to `/usr/local/src/yay`'
logg info 'Cloning yay from https://aur.archlinux.org/yay.git to /usr/local/src/yay'
sudo git clone https://aur.archlinux.org/yay.git /usr/local/src/yay
cd /usr/local/src/yay
logg info 'Installing yay via `sudo makepkg -si`'
logg info 'Installing yay via sudo makepkg -si'
sudo makepkg -si
fi
elif [ '{{ .host.distro.id }}' = 'centos' ]; then
@ -97,19 +97,19 @@ elif [ '{{ .host.distro.id }}' = 'centos' ]; then
fi
### Print dependency list
logg 'Installing common dependencies using `'"$PKG_MANAGER"'`'
logg 'Installing common dependencies using '"$PKG_MANAGER"''
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
logg info 'Checking for presence of '"$PACKAGE"''
if rpm -qa | grep "^$PACKAGE-" > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'
logg info 'Installing '"$PACKAGE"''
sudo "$PKG_MANAGER" install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via `'"$PKG_MANAGER"'`'
logg error 'Error installing '"$PACKAGE"' via '"$PKG_MANAGER"''
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
@ -117,11 +117,11 @@ elif [ '{{ .host.distro.id }}' = 'centos' ]; then
done
elif [ '{{ .host.distro.id }}' = 'debian' ]; then
### Print dependency list
logg 'Installing common dependencies using `apt-get`'
logg 'Installing common dependencies using apt-get'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Update apt-get cache
logg info 'Running `sudo apt-get update`'
logg info 'Running sudo apt-get update'
sudo apt-get update
### Update debconf for non-interactive installation
@ -132,14 +132,14 @@ elif [ '{{ .host.distro.id }}' = 'debian' ]; then
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
logg info 'Checking for presence of '"$PACKAGE"''
if dpkg -l "$PACKAGE" | grep -E '^ii' > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'
logg info 'Installing '"$PACKAGE"''
sudo apt-get install -y --no-install-recommends "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via apt-get'
logg error 'Error installing '"$PACKAGE"' via apt-get'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
@ -174,19 +174,19 @@ elif [ '{{ .host.distro.id }}' = 'fedora' ]; then
logg warn 'Skipping installation of Appstream data because GNOME is not installed'
fi
### Print dependency list
logg 'Installing common dependencies using `dnf`'
logg 'Installing common dependencies using dnf'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
logg info 'Checking for presence of '"$PACKAGE"''
if rpm -qa | grep "^$PACKAGE-" > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'
logg info 'Installing '"$PACKAGE"''
sudo dnf install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via dnf'
logg error 'Error installing '"$PACKAGE"' via dnf'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
@ -194,38 +194,38 @@ elif [ '{{ .host.distro.id }}' = 'fedora' ]; then
done
elif [ '{{ .host.distro.id }}' = 'freebsd' ]; then
### Print dependency list
logg 'Installing common dependencies using `pkg`'
logg 'Installing common dependencies using pkg'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install base dependencies
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Installing `'"$PACKAGE"'`'
logg info 'Installing '"$PACKAGE"''
sudo pkg install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via zypper'
logg error 'Error installing '"$PACKAGE"' via zypper'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
done
elif [ '{{ .host.distro.id }}' = 'opensuse' ]; then
### Print dependency list
logg 'Installing common dependencies using `zypper`'
logg 'Installing common dependencies using zypper'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Install base_devel
logg info 'Installing base_devel pattern with `sudo zypper install -t pattern devel_basis`'
logg info 'Installing base_devel pattern with sudo zypper install -t pattern devel_basis'
sudo zypper install -t pattern devel_basis
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
logg info 'Checking for presence of '"$PACKAGE"''
if rpm -qa | grep "$PACKAGE" > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'
logg info 'Installing '"$PACKAGE"''
sudo zypper install -y "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via zypper'
logg error 'Error installing '"$PACKAGE"' via zypper'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi
@ -233,11 +233,11 @@ elif [ '{{ .host.distro.id }}' = 'opensuse' ]; then
done
elif [ '{{ .host.distro.id }}' = 'ubuntu' ]; then
### Print dependency list
logg 'Installing common dependencies using `apt-get`'
logg 'Installing common dependencies using apt-get'
logg info 'Dependencies: {{ $packages | sortAlpha | uniq | join " " -}}'
### Update apt-get cache
logg info 'Running `sudo apt-get update`'
logg info 'Running sudo apt-get update'
sudo apt-get update
### Update debconf for non-interactive installation
@ -248,14 +248,14 @@ elif [ '{{ .host.distro.id }}' = 'ubuntu' ]; then
### Install packages if they are not already present
for PACKAGE in {{ $packages | sortAlpha | uniq | join " " -}}; do
logg info 'Checking for presence of `'"$PACKAGE"'`'
logg info 'Checking for presence of '"$PACKAGE"''
if dpkg -l "$PACKAGE" | grep -E '^ii' > /dev/null; then
logg info 'The '"$PACKAGE"' package is already installed'
else
logg info 'Installing `'"$PACKAGE"'`'
logg info 'Installing '"$PACKAGE"''
sudo apt-get install -y --no-install-recommends "$PACKAGE" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing `'"$PACKAGE"'` via apt-get'
logg error 'Error installing '"$PACKAGE"' via apt-get'
logg info 'Proceeding with installation..'
unset EXIT_CODE
fi

View file

@ -47,26 +47,26 @@ also ensures the user's `~/.bashrc` and `~/.zshrc` profiles are setup for use wi
### Ensure node is installed
if ! command -v node > /dev/null; then
if command -v brew; then
logg 'Installing `node` via Homebrew'
logg 'Installing node via Homebrew'
brew install node || NODE_EXIT_CODE=$?
if [ -n "$NODE_EXIT_CODE" ]; then
logg warn 'Calling `brew link --overwrite node` because the Node.js installation seems to be misconfigured'
logg warn 'Calling brew link --overwrite node because the Node.js installation seems to be misconfigured'
brew link --overwrite node
fi
else
logg '`brew` is unavailable. Cannot use it to perform a system installation of node.'
logg 'brew is unavailable. Cannot use it to perform a system installation of node.'
fi
else
logg '`node` is available'
logg 'node is available'
fi
### Ensure Volta is installed
if ! command -v volta > /dev/null; then
if command -v brew > /dev/null; then
logg 'Installing `volta` via `brew`'
logg 'Installing volta via brew'
brew install volta
else
logg warn '`brew` needs to be available to install Volta'
logg warn 'brew needs to be available to install Volta'
fi
else
if ! node --version > /dev/null; then
@ -79,7 +79,7 @@ if command -v volta > /dev/null; then
### Handle scenario where VOLTA_HOME is not defined yet
if [ -z "$VOLTA_HOME" ]; then
logg warn 'VOLTA_HOME is not defined'
logg info 'Running `volta setup`'
logg info 'Running volta setup'
volta setup
fi
@ -87,27 +87,27 @@ if command -v volta > /dev/null; then
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
else
logg warn 'Could not find `~/.bashrc` to source the results of `volta setup` from'
logg warn 'Could not find ~/.bashrc to source the results of volta setup from'
fi
### Set PATH and install latest Node.js version via Volta
export PATH="$VOLTA_HOME/bin:$PATH"
logg 'Installing `node` via `volta`'
logg 'Installing node via volta'
volta install node@latest
else
logg warn '`volta` needs to be installed'
logg warn 'volta needs to be installed'
fi
### Ensure zx is installed
if ! command -v zx > /dev/null; then
if command -v volta > /dev/null; then
logg 'Installing `zx` via `volta`'
logg 'Installing zx via volta'
volta install zx
else
logg '`volta` is missing'
logg 'volta is missing'
fi
else
logg '`zx` is already installed'
logg 'zx is already installed'
fi
{{ end -}}
```

View file

@ -35,7 +35,7 @@ via Homebrew. The list of packages is defined in `home/.chezmoitemplates/darwin/
{{ includeTemplate "universal/logg-before" }}
if command -v brew > /dev/null; then
logg 'Installing base dependencies for macOS using `brew bundle`'
logg 'Installing base dependencies for macOS using brew bundle'
logg info 'Dependencies: age asdf jq node glow go go-task/tap/go-task gnupg gum m-cli progress volta yq m-cli yq zx'
logg info 'GNU compatibility dependencies: coreutils findutils'
@ -43,7 +43,7 @@ if command -v brew > /dev/null; then
{{ includeTemplate "darwin/Brewfile" . -}}
EOF
else
logg error '`brew` was not found in the PATH'
logg error 'brew was not found in the PATH'
fi
{{ end -}}
```

View file

@ -43,27 +43,27 @@ for PKG in {{ $removePackages }}; do
elif command -v apt-get > /dev/null; then
if dpkg -l "$PKG" | grep -E '^ii' > /dev/null; then
sudo apt-get remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via apt-get'
logg success 'Removed '"$PKG"' via apt-get'
fi
elif command -v dnf > /dev/null; then
if rpm -qa | grep "$PKG" > /dev/null; then
sudo dnf remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via dnf'
logg success 'Removed '"$PKG"' via dnf'
fi
elif command -v yum > /dev/null; then
if rpm -qa | grep "$PKG" > /dev/null; then
sudo yum remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via yum'
logg success 'Removed '"$PKG"' via yum'
fi
elif command -v pacman > /dev/null; then
if pacman -Qs "$PKG" > /dev/null; then
sudo pacman -R "$PKG"
logg success 'Removed `'"$PKG"'` via pacman'
logg success 'Removed '"$PKG"' via pacman'
fi
elif command -v zypper > /dev/null; then
if rpm -qa | grep "$PKG" > /dev/null; then
sudo zypper remove -y "$PKG"
logg success 'Removed `'"$PKG"'` via zypper'
logg success 'Removed '"$PKG"' via zypper'
fi
fi
done

View file

@ -41,7 +41,7 @@ fi
### Set timezone
if command -v timedatectl > /dev/null; then
logg info 'Setting timezone to `{{ .user.timezone }}`'
logg info 'Setting timezone to {{ .user.timezone }}'
sudo timedatectl set-timezone {{ .user.timezone }}
fi

View file

@ -78,7 +78,7 @@ if [ ! -f /swapfile ]; then
### Enable the /swapfile
if [ -f /swapfile ]; then
logg info 'Running `sudo swapon /swapfile`'
logg info 'Running sudo swapon /swapfile'
sudo swapon /swapfile
if cat /etc/fstab | grep "/swapfile"; then
sudo sed -i '/\/swapfile/\/swapfile none swap defaults 0 0/' /etc/fstab

View file

@ -130,7 +130,7 @@ function gVisorPreBuilt() {
mkdir /tmp/gvisor && cd /tmp/gvisor
ARCH=$(uname -m)
URL="https://storage.googleapis.com/gvisor/releases/release/latest/${ARCH}"
logg info 'Downloading gVisor `runsc` and `containerd-shim-runsc-v1` SHA signatures'
logg info 'Downloading gVisor runsc and containerd-shim-runsc-v1 SHA signatures'
wget "${URL}/runsc ${URL}/runsc.sha512" "${URL}/containerd-shim-runsc-v1 ${URL}/containerd-shim-runsc-v1.sha512"
sha512sum -c runsc.sha512 -c containerd-shim-runsc-v1.sha512
rm -f *.sha512
@ -172,7 +172,7 @@ function gVisorSource() {
if [ -f ./bin/runsc ]; then
sudo cp ./bin/runsc /usr/local/bin
else
logg error 'Timed out while building `runsc` from source' && exit 6
logg error 'Timed out while building runsc from source' && exit 6
fi
}
@ -200,7 +200,7 @@ if [ ! -d /Applications ] || [ ! -d /System ]; then
logg success 'gVisor installed from pre-built Google-provided binaries'
fi
else
logg info '`runsc` is installed'
logg info 'runsc is installed'
fi
### Ensure Docker is configured to use runsc
@ -224,12 +224,12 @@ if [ ! -d /Applications ] || [ ! -d /System ]; then
fi
# Test Docker /w runsc
logg info 'Testing that Docker can load application with `runsc`'
logg info 'Testing that Docker can load application with runsc'
docker run --rm --runtime=runsc hello-world || RUNSC_EXIT_CODE=$?
if [ -n "$RUNSC_EXIT_CODE" ]; then
logg error 'Failed to run the Docker hello-world container with runsc' && exit 5
else
logg success 'Docker successfully ran the hello-world container with `runsc`'
logg success 'Docker successfully ran the hello-world container with runsc'
fi
fi
fi

View file

@ -43,9 +43,9 @@ sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/qubes/qubes-templates.repo" /etc/q
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/qubes/qubes-dom0.repo" /etc/yum.repos.d/qubes-dom0.repo
### Update dom0
logg info 'Updating dom0 via `qubesctl`'
logg info 'Updating dom0 via qubesctl'
sudo qubesctl --show-output state.sls update.qubes-dom0
logg info 'Updating dom0 via `qubes-dom0-update`'
logg info 'Updating dom0 via qubes-dom0-update'
sudo qubes-dom0-update --clean -y
### Install qubes-repo-contrib
@ -59,7 +59,7 @@ for PACKAGE of {{ .qubes.dom0Packages | toString | replace "[" "" | replace "]"
done
### Ensure sys-whonix is running
logg info 'Ensuring `sys-whonix` is running'
logg info 'Ensuring sys-whonix is running'
qvm-start sys-whonix --skip-if-running
{{ end -}}
```

View file

@ -32,7 +32,7 @@ for the updates to finish.
# for the updates to finish.
### Update TemplateVMs
logg info 'Updating TemplateVMs via `qubesctl`'
logg info 'Updating TemplateVMs via qubesctl'
timeout 900 qubesctl --show-output --skip-dom0 --templates state.sls update.qubes-vm
{{ end -}}
```

View file

@ -30,7 +30,7 @@ Mirage firewall so it can be used as a unikernel firewall VM.
# Mirage firewall so it can be used as a unikernel firewall VM.
### Update TemplateVMs
logg info 'Updating TemplateVMs via `qubesctl`'
logg info 'Updating TemplateVMs via qubesctl'
timeout 900 qubesctl --show-output --skip-dom0 --templates state.sls update.qubes-vm
### Ensure mirage-firewall kernel folder setup

View file

@ -31,7 +31,7 @@ management from dom0 and into a seperate Qube.
### Enables sys-gui-gpu
enableSysGUIGPU() {
logg info 'Enabling `sys-gui-gpu`'
logg info 'Enabling sys-gui-gpu'
qubesctl top.enable qvm.sys-gui-gpu
qubesctl top.enable qvm.sys-gui-gpu pillar=True
qubesctl --all state.highstate

View file

@ -51,7 +51,7 @@ if [ -n "$KEYID" ] && command -v gpg > /dev/null; then
fi
KEYID_TRIMMED="$(echo "$KEYID" | sed 's/^0x//')"
if ! gpg --list-secret-keys --keyid-format=long | grep "$KEYID_TRIMMED" > /dev/null; then
logg info 'Attempting to download the specified public GPG key (`{{ .user.gpg.id }}`) from public keyservers'
logg info 'Attempting to download the specified public GPG key ({{ .user.gpg.id }}) from public keyservers'
sudo pkill dirmngr
dirmngr --daemon --standard-resolver
gpg --keyserver https://pgp.mit.edu --recv "$KEYID" || EXIT_CODE=$?
@ -76,6 +76,6 @@ if [ -n "$KEYID" ] && command -v gpg > /dev/null; then
logg 'Ensuring the trust of the provided public GPG key is set to maximum'
echo -e "trust\n5\ny" | gpg --command-fd 0 --edit-key "$KEYID"
else
logg warn '`gpg` appears to be unavailable. Is it installed and on the PATH?'
logg warn 'gpg appears to be unavailable. Is it installed and on the PATH?'
fi
```

View file

@ -214,7 +214,7 @@ logg() {
sudo -n true || SUDO_EXIT_CODE=$?
logg info 'Your user will temporarily be granted passwordless sudo for the duration of the script'
if [ -n "$SUDO_EXIT_CODE" ]; then
logg info 'Press `CTRL+C` to bypass this prompt to either enter your password when needed or perform a non-privileged installation'
logg info 'Press CTRL+C to bypass this prompt to either enter your password when needed or perform a non-privileged installation'
logg info 'Note: Non-privileged installations are not yet supported'
fi
@ -427,12 +427,12 @@ if [ ! -f "${XDG_CONFIG_HOME:-$HOME/.config}/chezmoi/chezmoi.yaml" ]; then
fi
# @description Run `chezmoi init` when the Chezmoi configuration is missing
logg info 'Running `chezmoi init` since the '"${XDG_CONFIG_HOME:-$HOME/.config}/chezmoi/chezmoi.yaml"' is not present'
logg info 'Running chezmoi init since the '"${XDG_CONFIG_HOME:-$HOME/.config}/chezmoi/chezmoi.yaml"' is not present'
chezmoi init
fi
# @description Run `chezmoi apply` and enable verbose mode if the `DEBUG_MODE` environment variable is set to true
logg info 'Running `chezmoi apply`'
logg info 'Running chezmoi apply'
if [ "$DEBUG_MODE" = 'true' ]; then
DEBUG_MODIFIER="-vvvvv"
fi

View file

@ -7,7 +7,7 @@
### i.e. Changes to upstream will not impact the play if your configuration files are stored locally
for TARGET in "files" "group_vars" "host_vars" "inventories" "templates"; do
if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/ansible/$TARGET" ] && [ "$(readlink -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/$TARGET")" != "${XDG_CONFIG_HOME:-$HOME/.config}/ansible/$TARGET" ]; then
logg 'Symlinking Ansible playbook `'"$TARGET"'` to ~/.config/ansible/$TARGET'
logg 'Symlinking Ansible playbook '"$TARGET"' to ~/.config/ansible/$TARGET'
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/$TARGET"
ln -s "${XDG_CONFIG_HOME:-$HOME/.config}/ansible/$TARGET" "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/$TARGET"
fi

View file

@ -35,7 +35,7 @@ elif [ -f /etc/passwd ]; then
logg info 'Ensuring hostname persists after reboot'
sudo hostnamectl set-hostname '{{ .host.hostname | replace .host.domain "" | replace "." "" }}.{{ .host.domain }}' && logg success 'Permanently changed hostname to {{ .host.hostname | replace .host.domain "" | replace "." "" }}.{{ .host.domain }}'
else
logg warn '`hostnamectl` was not available in the PATH - this operating system type might be unsupported'
logg warn 'hostnamectl was not available in the PATH - this operating system type might be unsupported'
fi
else
logg warn 'Could not configure hostname because system type was not detectable'
@ -57,7 +57,7 @@ if [ -d /Applications ] && [ -d /Library ] && [ -z "$NO_RESTART" ]; then
else
# If gtimeout is unavailable, then attempt system upgrade without a timeout (which usually works on fresh systems)
logg info 'Applying OS upgrades (if available)'
sudo softwareupdate -i -a -R || logg error 'Failed to perform a system update via `sudo softwareupdate -i -a`'
sudo softwareupdate -i -a -R || logg error 'Failed to perform a system update via sudo softwareupdate -i -a'
fi
logg info 'If system updates were downloaded / installed, a reboot might be required.'
fi

View file

@ -34,7 +34,7 @@
### Handle decryption failure
decryptionFailure() {
logg info 'Proceeding without decrypting age encryption key stored at `~/.local/share/chezmoi/home/key.txt.age`'
logg info 'Proceeding without decrypting age encryption key stored at ~/.local/share/chezmoi/home/key.txt.age'
logg info 'To have Chezmoi handle your encryption (so you can store your private files publicly) take a look at https://shorturl.at/jkpzG'
logg info 'Removing all files that begin with encrypted_ because decryption failed'
find "${XDG_DATA_HOME:-$HOME/.local/share}/chezmoi" -type f -name "encrypted_*" | while read ENCRYPTED_FILE; do
@ -46,7 +46,7 @@ decryptionFailure() {
### Install Age via Homebrew if not present
installAge() {
if ! command -v age > /dev/null; then
logg info 'Running `brew install age`'
logg info 'Running brew install age'
brew install age
fi
}
@ -54,7 +54,7 @@ installAge() {
### Install Expect via Homebrew if not present
installExpect() {
if ! command -v expect > /dev/null; then
logg info 'Running `brew install expect`'
logg info 'Running brew install expect'
brew install expect
fi
}
@ -65,7 +65,7 @@ decryptKey() {
if [ ! -f "${XDG_CONFIG_HOME}/age/chezmoi.txt" ]; then
mkdir -p "${XDG_CONFIG_HOME}/age"
if [ -z "$AGE_PASSWORD" ]; then
logg star '`PRESS ENTER` if you have not set up your encryption token yet'
logg star 'PRESS ENTER if you have not set up your encryption token yet'
age --decrypt --output "${XDG_CONFIG_HOME}/age/chezmoi.txt" "{{ .chezmoi.sourceDir }}/key.txt.age" || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
decryptionFailure
@ -80,10 +80,10 @@ decryptKey() {
send \"${AGE_PASSWORD}\r\"
expect eof" > /dev/null || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg info 'There was an issue decrypting the `key.txt.age` file with the provided `AGE_PASSWORD`'
logg info 'There was an issue decrypting the key.txt.age file with the provided AGE_PASSWORD'
decryptionFailure
else
logg info 'The encryption key was successfully decrypted using expect and the provided `AGE_PASSWORD`'
logg info 'The encryption key was successfully decrypted using expect and the provided AGE_PASSWORD'
fi
fi
fi
@ -98,7 +98,7 @@ elif [ -n "$HEADLESS_INSTALL" ] && [ -n "$AGE_PASSWORD" ]; then
installAge
decryptKey
else
logg info 'Skipping Age key decryption process - `HEADLESS_INSTALL` and `AGE_PASSWORD` should be passed in as env variables to automate the process'
logg info 'Skipping Age key decryption process - HEADLESS_INSTALL and AGE_PASSWORD should be passed in as env variables to automate the process'
fi
### Ensure proper permissions on private key

View file

@ -14,7 +14,7 @@ if [ -d /Applications ] && [ -d /System ]; then
logg info 'Configuring macOS to automatically apply system updates'
sudo mkdir -p /Library/LaunchDaemons
sudo cp -f "$HOME/Library/LaunchDaemons/com.apple.automatedupdates.plist" "/Library/LaunchDaemons/com.apple.automatedupdates.plist"
logg info 'Loading `/Library/LaunchDaemons/com.apple.automatedupdates.plist`'
logg info 'Loading /Library/LaunchDaemons/com.apple.automatedupdates.plist'
sudo launchctl load "/Library/LaunchDaemons/com.apple.automatedupdates.plist" && logg success 'launchctl load successful'
fi
fi

View file

@ -14,7 +14,7 @@
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
logg info 'Decrypting SSH keys stored in the `home/.chezmoitemplates/ssh` folder of the Install Doctor repo / fork.'
logg info 'Decrypting SSH keys stored in the home/.chezmoitemplates/ssh folder of the Install Doctor repo / fork.'
find "{{ .chezmoi.sourceDir }}/.chezmoitemplates/ssh" -type f | while read SSH_FILE; do
### Decrypt SSH file with Chezmoi
logg info "Decrypting the $(basename "$SSH_FILE") encrypted SSH file"

View file

@ -22,6 +22,6 @@ if command -v envchain > /dev/null; then
cat "$file" | chezmoi decrypt | envchain -s default "$(basename $file)" > /dev/null || logg info 'Importing "$(basename $file)" failed'
done
else
logg info '`envchain` is not installed or it is not available in the PATH'
logg info 'envchain is not installed or it is not available in the PATH'
fi
{{ end -}}

View file

@ -20,7 +20,7 @@ find '{{ .host.homeParentFolder }}' -mindepth 1 -maxdepth 1 -type d | while read
USER_FOLDER="$(echo "$HOME_DIR" | sed 's/.*\/\([^\/]*\)$/\1/')"
if [ -d "$HOME_DIR/.local" ]; then
if [ ! -d "/var/log/user/$USER_FOLDER" ]; then
logg info 'Creating `/var/log/user/'"$USER_FOLDER"'`'
logg info 'Creating /var/log/user/'"$USER_FOLDER"''
sudo mkdir -p "/var/log/user/$USER_FOLDER"
fi
fi

View file

@ -97,7 +97,7 @@ if command -v postfix > /dev/null; then
logg info 'Forward user e-mail to root@localhost'
echo '{{ .user.username }}: root' | sudo tee -a /etc/aliases > /dev/null
fi
logg info 'Running `newaliases` to regenerate the alias database'
logg info 'Running newaliases to regenerate the alias database'
sudo newaliases
else
logg warn '/etc/aliases does not appear to exist'

View file

@ -14,7 +14,7 @@
### Symlink python3 to python if it is unavailable
if ! command -v python > /dev/null && command -v python3 > /dev/null; then
logg info 'Symlinking `python3` to `python` since the latter is unavailable'
logg info 'Symlinking python3 to python since the latter is unavailable'
sudo ln -s "$(which python3)" /usr/local/bin/python
fi

View file

@ -11,7 +11,7 @@
### Ensure id_rsa is present and create one if it does not exist
if [ ! -f "$HOME/.ssh/id_rsa" ]; then
logg 'Generating missing default private key / public key (`~/.ssh/id_rsa`)'
logg 'Generating missing default private key / public key (~/.ssh/id_rsa)'
ssh-keygen -b 4096 -t rsa -f "$HOME/.ssh/id_rsa" -q -N ""
chmod 600 "$HOME/.ssh/id_rsa"
fi

View file

@ -22,7 +22,7 @@
# find "$HOME/.ssh" -type f -maxdepth 1 ! -name "*.pub" ! -name "*authorized_keys*" ! -name "known_host*" ! -name "config" | while read FILE; do
# if [ ! -f "${FILE}.pub" ]; then
# logg info 'Generating missing public key for `'"$FILE"'`'
# logg info 'Generating missing public key for '"$FILE"''
# ssh-keygen -f "$FILE" -y > "${FILE}.pub"
# chmod 600 "${FILE}.pub"
# fi

View file

@ -35,7 +35,7 @@ find "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/roles" -mindepth 2 -maxde
ROLE_FOLDER="professormanhattan.$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
ALT_ROLE_FOLDER="$(echo "$ROLE_PATH" | sed 's/.*\/\([^\/]*\)$/\1/')"
if [ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER" ] || [ "$(readlink -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER")" != "$ROLE_PATH" ]; then
logg info 'Symlinking `'"$ROLE_FOLDER"'`'
logg info 'Symlinking '"$ROLE_FOLDER"''
rm -f "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER"
ln -s "$ROLE_PATH" "${XDG_DATA_HOME:-$HOME/.local/share}/ansible/roles/$ROLE_FOLDER"
fi
@ -51,10 +51,10 @@ if [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/gas-station/requirements.yml" ]; t
if ! command -v pipx > /dev/null; then
logg info 'Installing pipx via Homebrew'
brew install pipx
logg info 'Running `pipx ensurepath`'
logg info 'Running pipx ensurepath'
pipx ensurepath
fi
logg info 'Installing `ansible-core` via pipx'
logg info 'Installing ansible-core via pipx'
pipx install ansible-core
if [ -d /Applications ] && [ -d /System ]; then
logg info 'Injecting macOS-specific pipx dependencies via pipx'

View file

@ -46,8 +46,8 @@ if command -v install-program > /dev/null; then
# TODO - Figure out how to configure no logs to print to ~/.ansible.log -- should be printing to the value specified in the ansible.cfg
rm -rf "$HOME/.ansible.log"
else
logg error '`zx` is not available'
logg error 'zx is not available'
fi
else
logg error '`install-program` is not in the PATH. It should be located in ~/.local/bin.'
logg error 'install-program is not in the PATH. It should be located in ~/.local/bin.'
fi

View file

@ -21,7 +21,7 @@ if command -v keybase > /dev/null; then
logg warn "No Keybase config located at $KEYBASE_CONFIG"
fi
else
logg info 'The `keybase` executable is not available'
logg info 'The keybase executable is not available'
fi
{{ end -}}

View file

@ -18,7 +18,7 @@ if command -v timeshift > /dev/null; then
logg info "Copying $TIMESHIFT_CONFIG to /etc/timeshift/timeshift.json"
sudo cp -f "$TIMESHIFT_CONFIG" /etc/timeshift/timeshift.json
else
logg info 'The `timeshift` executable is not available'
logg info 'The timeshift executable is not available'
fi
{{ end -}}

View file

@ -15,22 +15,22 @@ if [ -f "$ASDF_DIR/asdf.sh" ] && [ -f ~/.tool-versions ]; then
logg info 'Sourcing asdf.sh'
. ${ASDF_DIR}/asdf.sh
cat .tool-versions | while read TOOL; do
logg info 'Installing ASDF plugin `'"$(echo "$TOOL" | sed 's/ .*//')"'`'
logg info 'Installing ASDF plugin '"$(echo "$TOOL" | sed 's/ .*//')"''
asdf plugin add "$(echo "$TOOL" | sed 's/ .*//')"
done
# Only proceed with installation if either DEBUG_MODE is enabled or ~/.cache/megabyte-labs/asdf-install is missing
# Added to save time between tests because PHP takes awhile to install
if [ "$DEBUG_MODE" == 'true' ] || [ ! -f "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs/asdf-install" ]; then
logg info 'Installing ASDF dependencies derived from `~/.tool-versions` via `asdf install`'
logg info 'Installing ASDF dependencies derived from ~/.tool-versions via asdf install'
asdf install || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg error 'Error installing the ASDF plugins specified in `~/.tool-versions`'
logg error 'Error installing the ASDF plugins specified in ~/.tool-versions'
fi
mkdir -p "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs"
touch "${XDG_CACHE_HOME:-$HOME/.cache}/megabyte-labs/asdf-install"
fi
else
logg warn 'The `$ASDF_DIR/asdf.sh` or `~/.tool-versions` file is not present'
logg warn 'The $ASDF_DIR/asdf.sh or ~/.tool-versions file is not present'
fi
{{ end -}}

View file

@ -22,7 +22,7 @@ if [ -d /Applications ] && [ -d /System ]; then
# 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
logg info 'Enabling VNC using the `VNC_PASSWORD` variable which is `vncpass` when nothing is specified'
logg info 'Enabling VNC using the VNC_PASSWORD variable which is vncpass when nothing is specified'
sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -allowAccessFor -specifiedUsers -clientopts -setreqperm -reqperm yes -setvnclegacy -vnclegacy yes -setvncpw -vncpw "{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "VNC_PASSWORD")) }}{{ includeTemplate "secrets/VNC_PASSWORD" | decrypt | trim }}{{ else }}{{ default "vncpass" (env "VNC_PASSWORD") }}{{ end }}" -restart -agent -privs -all -users "$USER"
else
# System is Linux
@ -33,7 +33,7 @@ else
sudo cp -Rf "${XDG_CONFIG_HOME:-$HOME/.config}/vnc/etc/kasmvnc/" /etc/
logg info 'Adding VNC full-control password to ~/.config/vnc/kasmpasswd'
echo -e "{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "VNC_PASSWORD")) }}{{ includeTemplate "secrets/VNC_PASSWORD" | decrypt | trim }}{{ else }}{{ default "vncpass" (env "VNC_PASSWORD") }}{{ end }}\n{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "VNC_PASSWORD")) }}{{ includeTemplate "secrets/VNC_PASSWORD" | decrypt | trim }}{{ else }}{{ default "vncpass" (env "VNC_PASSWORD") }}{{ end }}" | kasmvncpasswd -u {{ .user.name }} -rwo
logg info 'Adding VNC read-only password to ~/.config/vnc/kasmpasswd for user `readonly`'
logg info 'Adding VNC read-only password to ~/.config/vnc/kasmpasswd for user readonly'
echo -e "{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "VNC_READ_PASSWORD")) }}{{ includeTemplate "secrets/VNC_READ_PASSWORD" | decrypt | trim }}{{ else }}{{ default "readonly" (env "VNC_READ_PASSWORD") }}{{ end }}\n{{- if and (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) (stat (joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "VNC_READ_PASSWORD")) }}{{ includeTemplate "secrets/VNC_READ_PASSWORD" | decrypt | trim }}{{ else }}{{ default "readonly" (env "VNC_READ_PASSWORD") }}{{ end }}" | kasmvncpasswd -u guest -r
logg info 'Reloading the systemctl configuration files since a new one for VNC may have been added'
sudo systemctl daemon-reload

View file

@ -19,13 +19,13 @@ fi
### Ensure SDKMan is installed (https://sdkman.io/)
if [ ! -d "$SDKMAN_DIR" ]; then
logg info 'Installing SDKMan via `curl -s "https://get.sdkman.io?rcupdate=false`'
logg info 'Installing SDKMan via curl -s "https://get.sdkman.io?rcupdate=false'
logg info "Install directory: $SDKMAN_DIR"
curl -s "https://get.sdkman.io?rcupdate=false" | bash
logg info 'Running `sdk install java` with bash -c'
logg info 'Running sdk install java with bash -c'
bash -c 'sdk install java'
else
logg info 'SDKMan appears to already be installed.'
logg info 'Running `sdk update`'
logg info 'Running sdk update'
sdk update
fi

View file

@ -42,7 +42,7 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/desktop/gnome.yml" ]; then
done
done
else
logg warn 'The `~/.config/desktop/gnome.yml` file is missing so GNOME extension install orders cannot be calculated'
logg warn 'The ~/.config/desktop/gnome.yml file is missing so GNOME extension install orders cannot be calculated'
fi
### Remove /tmp/install-gnome-extensions.txt if it is empty
@ -53,7 +53,7 @@ fi
### Install the GNOME extensions using the `install-gnome-extensions` script
if command -v install-gnome-extensions > /dev/null; then
if [ -f /tmp/install-gnome-extensions.txt ]; then
logg info 'Running the `install-gnome-extensions` script'
logg info 'Running the install-gnome-extensions script'
cd /tmp
install-gnome-extensions --enable --overwrite --file /tmp/install-gnome-extensions.txt
rm -f /tmp/install-gnome-extensions.txt
@ -62,7 +62,7 @@ if command -v install-gnome-extensions > /dev/null; then
logg info 'No new GNOME extensions to install'
fi
else
logg warn 'Cannot install GNOME extensions because the `install-gnome-extensions` script is missing from ~/.local/bin'
logg warn 'Cannot install GNOME extensions because the install-gnome-extensions script is missing from ~/.local/bin'
fi
### Apply plugin gsettings
@ -83,7 +83,7 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/desktop/gnome.yml" ]; then
EXT_SETTINGS_TYPE="$(cat "$TMP" | jq -r '.settings | type')"
EXT_SETTINGS="$(cat "$TMP" | jq -r '.settings')"
if [ "$EXT_SETTINGS" != 'null' ]; then
logg info 'Evaluating extension settings for `'"$EXT_ID"'`'
logg info 'Evaluating extension settings for '"$EXT_ID"''
if [ "$EXT_SETTINGS_TYPE" == 'array' ]; then
cat "$TMP" | jq -r '.settings[]' | while read EXT_SETTING; do
logg info 'Applying following extension setting:'
@ -95,7 +95,7 @@ if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/desktop/gnome.yml" ]; then
echo "$EXT_SETTINGS"
eval "$EXT_SETTINGS"
fi
logg success 'Applied gsettings configuration for the `'"$EXT_ID"'` GNOME extension'
logg success 'Applied gsettings configuration for the '"$EXT_ID"' GNOME extension'
fi
done
fi

View file

@ -41,7 +41,7 @@ if command -v squash-symlink > /dev/null; then
logg info 'Converting /usr/local/share/grub symlinks to equivalent regular files'
sudo find /usr/local/share/grub -type l -exec squash-symlink {} +
else
logg warn '`squash-symlink` is not a script in the PATH'
logg warn 'squash-symlink is not a script in the PATH'
fi
### Ensure /usr/share/backgrounds/default.png is deleted
@ -75,7 +75,7 @@ if [ -f '/usr/local/share/plymouth/themes/{{ .theme }}/icons/{{ .host.distro.id
sudo cp -f '/usr/local/share/plymouth/themes/{{ .theme }}/icons/{{ .host.distro.id }}.png' '/usr/local/share/plymouth/themes/{{ .theme }}/icon.png'
logg success 'Added platform-specific icon to {{ .theme }} Plymouth theme'
else
logg warn 'The `{{ .host.distro.id }}.png` icon is not available in the icons folder insider the {{ .theme }} Plymouth theme'
logg warn 'The {{ .host.distro.id }}.png icon is not available in the icons folder insider the {{ .theme }} Plymouth theme'
fi
{{ end -}}

View file

@ -29,7 +29,7 @@ if [ -d /etc/fonts ]; then
logg info 'Copying ~/.config/fontconfig/fonts.conf to /etc/fonts/local.conf'
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/fontconfig/fonts.conf" /etc/fonts/local.conf
else
logg warn 'The `/etc/fonts` directory is missing'
logg warn 'The /etc/fonts directory is missing'
fi
{{ end -}}

View file

@ -41,12 +41,12 @@ if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/dconf/settings" ]; then
fi
# Reset dconf settings if environment variable RESET_DCONF is set to true
if [ "$RESET_DCONF" == 'true' ]; then
logg info 'Resetting dconf settings for `'"$DCONF_SETTINGS_ID"'`'
logg info 'Resetting dconf settings for '"$DCONF_SETTINGS_ID"''
dconf reset -f "$DCONF_SETTINGS_ID"
fi
logg info 'Loading versioned dconf settings for `'"$DCONF_SETTINGS_ID"'`'
logg info 'Loading versioned dconf settings for '"$DCONF_SETTINGS_ID"''
dconf load "$DCONF_SETTINGS_ID" < "$DCONF_CONFIG_FILE"
logg success 'Finished applying dconf settings for `'"$DCONF_SETTINGS_ID"'`'
logg success 'Finished applying dconf settings for '"$DCONF_SETTINGS_ID"''
done
else
logg warn '~/.config/dconf/settings does not exist!'

View file

@ -12,6 +12,6 @@
if command -v m > /dev/null && [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png" ]; then
m wallpaper "${XDG_DATA_HOME:-$HOME/.local/share}/betelgeuse/share/wallpapers/Betelgeuse-macOS/contents/source.png"
else
logg warn 'Either `m` or the macOS default wallpaper is missing.'
logg warn 'Either m or the macOS default wallpaper is missing.'
fi
{{ end -}}

View file

@ -37,7 +37,7 @@ fi
# @description Ensures the `/etc/wireguard` directory exists and has the lowest possible permission-level
if [ ! -d /etc/wireguard ]; then
logg info 'Creating `/etc/wireguard` since it does not exist yet'
logg info 'Creating /etc/wireguard since it does not exist yet'
sudo mkdir -p /etc/wireguard
sudo chmod 600 /etc/wireguard
fi
@ -45,7 +45,7 @@ fi
# @description Cycles through the `*.conf` files in `${XDG_CONFIG_HOME:-$HOME/.config}/vpn` and adds them to the `/etc/wireguard` folder
find "${XDG_CONFIG_HOME:-$HOME/.config}/vpn" -mindepth 1 -maxdepth 1 -type f -name "*.conf" | while read WG_CONF; do
WG_FILE="$(basename "$WG_CONF")"
logg info 'Adding `'"$WG_FILE"'` to /etc/wireguard'
logg info 'Adding '"$WG_FILE"' to /etc/wireguard'
sudo cp -f "$WG_CONF" "/etc/wireguard/$WG_FILE"
done

View file

@ -82,7 +82,7 @@ if command -v nmcli > /dev/null; then
done
else
logg info 'Either the OpenVPN username or password is undefined.'
logg info 'See the `docs/VARIABLES.md` file for details.'
logg info 'See the docs/VARIABLES.md file for details.'
fi
{{ if (stat (joinPath .host.home ".config" "age" "chezmoi.txt")) }}
@ -91,8 +91,8 @@ if command -v nmcli > /dev/null; then
find "${XDG_CONFIG_HOME:-$HOME/.config}/vpn" -type f -name "*.nmconnection" | while read WG_FILE; do
# @description Ensure the WireGuard NetworkManager plugin is available
if [ ! -d /usr/lib/NetworkManager/nm-wireguard-service ]; then
logg info 'The `nm-wireguard-service` is not present'
logg info 'Installing the `nm-wireguard-service`'
logg info 'The nm-wireguard-service is not present'
logg info 'Installing the nm-wireguard-service'
fi
# @description Add the WireGuard profiles
@ -120,7 +120,7 @@ if command -v nmcli > /dev/null; then
sudo service NetworkManager restart
fi
else
logg warn '`nmcli` is unavailable'
logg warn 'nmcli is unavailable'
fi
{{ end -}}

View file

@ -42,15 +42,15 @@ if command -v code > /dev/null; then
EXTENSIONS="$(code --list-extensions)"
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
logg info 'Installing Visual Studio Code extension `'"$EXTENSION"'`'
logg info 'Installing Visual Studio Code extension '"$EXTENSION"''
code --install-extension "$EXTENSION"
logg success 'Installed `'"$EXTENSION"'`'
logg success 'Installed '"$EXTENSION"''
else
logg info '`'"$EXTENSION"'` already installed'
logg info ''"$EXTENSION"' already installed'
fi
done
else
logg info '`code` executable not available - skipping plugin install process for it'
logg info 'code executable not available - skipping plugin install process for it'
fi
# @description Check for the presence of the `codium` command in the `PATH` and install extensions for VSCodium if it is present
@ -58,15 +58,15 @@ if command -v codium > /dev/null; then
EXTENSIONS="$(codium --list-extensions)"
jq -r '.recommendations[]' "${XDG_CONFIG_HOME:-$HOME/.config}/Code/User/extensions.json" | while read EXTENSION; do
if ! echo "$EXTENSIONS" | grep -iF "$EXTENSION" > /dev/null; then
logg info 'Installing VSCodium extension `'"$EXTENSION"'`'
logg info 'Installing VSCodium extension '"$EXTENSION"''
codium --install-extension "$EXTENSION"
logg success 'Installed `'"$EXTENSION"'`'
logg success 'Installed '"$EXTENSION"''
else
logg info '`'"$EXTENSION"'` already installed'
logg info ''"$EXTENSION"' already installed'
fi
done
else
logg info '`codium` executable not available - skipping plugin install process for it'
logg info 'codium executable not available - skipping plugin install process for it'
fi
{{ end -}}

View file

@ -54,7 +54,7 @@ if command -v toron > /dev/null; then
logg warn 'The '"$TORRC_CONFIG_DIR"' directory is missing'
fi
else
logg warn '`toron` is missing from the PATH'
logg warn 'toron is missing from the PATH'
fi
{{ end -}}

View file

@ -56,7 +56,7 @@ if command -v privoxy > /dev/null; then
logg warn 'The '"$PRIVOXY_CONFIG_DIR"' directory is missing'
fi
else
logg logg '`privoxy` is missing from the PATH - skipping configuration'
logg logg 'privoxy is missing from the PATH - skipping configuration'
fi
{{ end -}}

View file

@ -45,20 +45,20 @@
### Configures endlessh service
function configureEndlessh() {
### Update the service configuration file
logg info 'Updating `endlessh` service configuration file'
logg info 'Updating endlessh service configuration file'
sudo sed -i 's/^.*#AmbientCapabilities=CAP_NET_BIND_SERVICE/AmbientCapabilities=CAP_NET_BIND_SERVICE/' /usr/lib/systemd/system/endlessh.service
sudo sed -i 's/^.*PrivateUsers=true/#PrivateUsers=true/' /usr/lib/systemd/system/endlessh.service
logg info 'Reloading systemd'
sudo systemctl daemon-reload
### Update capabilities of `endlessh`
logg info 'Updating capabilities of `endlessh`'
logg info 'Updating capabilities of endlessh'
sudo setcap 'cap_net_bind_service=+ep' /usr/bin/endlessh
### Restart / enable Endlessh
logg info 'Enabling the `endlessh` service'
logg info 'Enabling the endlessh service'
sudo systemctl enable endlessh
logg info 'Restarting the `endlessh` service'
logg info 'Restarting the endlessh service'
sudo systemctl restart endlessh
}
@ -71,9 +71,9 @@ if [[ ! "$(test -d proc && grep Microsoft /proc/version > /dev/null)" ]]; then
configureEndlessh || CONFIGURE_EXIT_CODE=$?
if [ -n "$CONFIGURE_EXIT_CODE" ]; then
logg error 'Configuring `endlessh` service failed' && exit 1
logg error 'Configuring endlessh service failed' && exit 1
else
logg success 'Successfully configured `endlessh` service'
logg success 'Successfully configured endlessh service'
fi
elif [ -f /etc/endlessh.conf ]; then
logg info 'Copying ~/.ssh/endlessh/config to /etc/endlessh.conf'
@ -81,15 +81,15 @@ if [[ ! "$(test -d proc && grep Microsoft /proc/version > /dev/null)" ]]; then
configureEndlessh || CONFIGURE_EXIT_CODE=$?
if [ -n "$CONFIGURE_EXIT_CODE" ]; then
logg error 'Configuring `endlessh` service failed' && exit 1
logg error 'Configuring endlessh service failed' && exit 1
else
logg success 'Successfully configured `endlessh` service'
logg success 'Successfully configured endlessh service'
fi
else
logg warn 'Neither the /etc/endlessh folder nor the /etc/endlessh.conf file exist'
fi
else
logg info 'Skipping Endlessh configuration because the `endlessh` executable is not available in the PATH'
logg info 'Skipping Endlessh configuration because the endlessh executable is not available in the PATH'
fi
else
logg info 'Skipping Endlessh configuration since environment is WSL'

View file

@ -35,15 +35,15 @@ if [[ ! "$(test -d /proc && grep Microsoft /proc/version > /dev/null)" ]]; then
### Restart SSH server
if [ -d /Applications ] && [ -d /System ]; then
# macOS
logg info 'Running `sudo launchctl stop com.openssh.sshd`'
logg info 'Running sudo launchctl stop com.openssh.sshd'
sudo launchctl stop com.openssh.sshd
logg info 'Running `sudo launchctl start com.openssh.sshd`'
logg info 'Running sudo launchctl start com.openssh.sshd'
sudo launchctl start com.openssh.sshd
else
# Linux
logg info 'Enabling the `sshd` service'
logg info 'Enabling the sshd service'
sudo systemctl enable sshd
logg info 'Restarting the `sshd` service'
logg info 'Restarting the sshd service'
sudo systemctl restart sshd
fi
else

View file

@ -21,13 +21,13 @@
function restartFail2Ban() {
if [ -d /Applications ] && [ -d /System ]; then
# macOS
logg info 'Enabling the `fail2ban` Homebrew service'
logg info 'Enabling the fail2ban Homebrew service'
brew services start fail2ban
else
# Linux
logg info 'Enabling the `fail2ban` service'
logg info 'Enabling the fail2ban service'
sudo systemctl enable fail2ban
logg info 'Restarting the `fail2ban` service'
logg info 'Restarting the fail2ban service'
sudo systemctl restart fail2ban
fi
}

View file

@ -33,23 +33,23 @@ function gitomaticSetup() {
if [ -d /Applications ] && [ -d /System ]; then
### macOS
logg info 'Copying `gitomatic` plist file to /Library/LaunchDaemons'
logg info 'Copying gitomatic plist file to /Library/LaunchDaemons'
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/gitomatic/gitomatic.plist" /Library/LaunchDaemons/gitomatic.plist
if ! sudo launchctl list | grep 'gitomatic' > /dev/null; then
logg info 'Running `sudo launchctl load /Library/LaunchDaemons/gitomatic.plist`'
logg info 'Running sudo launchctl load /Library/LaunchDaemons/gitomatic.plist'
sudo launchctl load /Library/LaunchDaemons/gitomatic.plist
logg info 'Running `sudo launchctl start /Library/LaunchDaemons/gitomatic.plist`'
logg info 'Running sudo launchctl start /Library/LaunchDaemons/gitomatic.plist'
sudo launchctl start /Library/LaunchDaemons/gitomatic.plist
else
logg info "gitomatic services appear to already be loaded"
fi
else
### Linux
logg info 'Copying `gitomatic` systemd unit file to /etc/systemd/system/'
logg info 'Copying gitomatic systemd unit file to /etc/systemd/system/'
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/gitomatic/gitomatic.service" /etc/systemd/system/gitomatic.service
logg info 'Reloading systemd daemon'
sudo systemctl daemon-reload
logg info 'Enabling and starting `gitomatic` service'
logg info 'Enabling and starting gitomatic service'
sudo systemctl enable --now gitomatic
fi
else

View file

@ -12,7 +12,7 @@
function vimSetup() {
### Run the VIM plugin install routine
if command -v vim > /dev/null; then
vim +PlugInstall +qall > /dev/null && logg success 'Successfully ran `vim +PlugInstall +qall`' || logg error 'Failed to run `vim +PlugInstall +qll`'
vim +PlugInstall +qall > /dev/null && logg success 'Successfully ran vim +PlugInstall +qall' || logg error 'Failed to run vim +PlugInstall +qll'
fi
}
vimSetup

View file

@ -313,13 +313,13 @@ function firefoxSetup() {
# to the user profile.
# logg info 'Unzipping '"$PLUGIN_FILENAME"' ('"$FIREFOX_PLUGIN"')'
# unzip "$SETTINGS_DIR/$SETTINGS_PROFILE/extensions/$PLUGIN_FILENAME" -d "$SETTINGS_DIR/$SETTINGS_PROFILE/extensions/$PLUGIN_FOLDER"
logg success 'Installed `'"$FIREFOX_PLUGIN"'`'
logg success 'Installed '"$FIREFOX_PLUGIN"''
fi
else
logg warn 'A null Firefox add-on filename was detected for `'"$FIREFOX_PLUGIN"'`'
logg warn 'A null Firefox add-on filename was detected for '"$FIREFOX_PLUGIN"''
fi
else
logg warn 'A null Firefox add-on ID was detected for `'"$FIREFOX_PLUGIN"'`'
logg warn 'A null Firefox add-on ID was detected for '"$FIREFOX_PLUGIN"''
fi
done
fi

View file

@ -15,21 +15,21 @@
if [ -d /Applications ] && [ -d /System ]; then
if ! command -v defaultbrowser > /dev/null; then
logg info 'Installing `defaultbrowser` via Homebrew which is the preferred way of configuring the default browser'
logg info 'Installing defaultbrowser via Homebrew which is the preferred way of configuring the default browser'
brew install defaultbrowser
fi
logg info "Setting default browser to {{ .user.defaultBrowserDarwin }}"
defaultbrowser "{{ .user.defaultBrowserDarwin }}"
else
logg info 'Setting default browser for `text/html` to `{{ .user.defaultBrowser }}`'
logg info 'Setting default browser for text/html to {{ .user.defaultBrowser }}'
xdg-mime default {{ .user.defaultBrowser }}.desktop text/html
logg info 'Setting default browser for `x-scheme-handler/http` to `{{ .user.defaultBrowser }}`'
logg info 'Setting default browser for x-scheme-handler/http to {{ .user.defaultBrowser }}'
xdg-mime default {{ .user.defaultBrowser }}.desktop x-scheme-handler/http
logg info 'Setting default browser for `x-scheme-handler/https` to `{{ .user.defaultBrowser }}`'
logg info 'Setting default browser for x-scheme-handler/https to {{ .user.defaultBrowser }}'
xdg-mime default {{ .user.defaultBrowser }}.desktop x-scheme-handler/https
logg info 'Setting default browser for `x-scheme-handler/about` to `{{ .user.defaultBrowser }}`'
logg info 'Setting default browser for x-scheme-handler/about to {{ .user.defaultBrowser }}'
xdg-mime default {{ .user.defaultBrowser }}.desktop x-scheme-handler/about
logg info 'Setting default browser with `xdg-settings` to `{{ .user.defaultBrowser }}`'
logg info 'Setting default browser with xdg-settings to {{ .user.defaultBrowser }}'
xdg-settings set default-web-browser {{ .user.defaultBrowser }}.desktop
fi
{{ end -}}

View file

@ -103,7 +103,7 @@ function vmwareSetup() {
### Build VMWare host modules
logg info 'Building VMware host modules'
if sudo vmware-modconfig --console --install-all; then
logg success 'Built VMWare host modules successfully with `sudo vmware-modconfig --console --install-all`'
logg success 'Built VMWare host modules successfully with sudo vmware-modconfig --console --install-all'
else
logg info 'Acquiring VMware version from CLI'
VMW_VERSION="$(vmware --version | cut -f 3 -d' ')"
@ -113,7 +113,7 @@ function vmwareSetup() {
curl -sSL "https://github.com/mkubecek/vmware-host-modules/archive/workstation-$VMW_VERSION.tar.gz" -o /tmp/vmw_patch/workstation.tar.gz
tar -xzf /tmp/vmw_patch/workstation.tar.gz
cd vmware*
logg info 'Running `sudo make` and `sudo make install`'
logg info 'Running sudo make and sudo make install'
sudo make
sudo make install
logg success 'Successfully configured VMware host module patches'
@ -150,22 +150,22 @@ function vmwareSetup() {
if [[ ! "$(test -d /proc && grep Microsoft /proc/version > /dev/null)" ]]; then
### Start / enable VMWare service
logg info 'Ensuring `vmware.service` is enabled and running'
logg info 'Ensuring vmware.service is enabled and running'
sudo systemctl enable vmware.service
sudo systemctl restart vmware.service
### Start / enable VMWare Workstation Server service
logg info 'Ensuring `vmware-workstation-server.service` is enabled and running'
logg info 'Ensuring vmware-workstation-server.service is enabled and running'
sudo systemctl enable vmware-workstation-server.service
sudo systemctl restart vmware-workstation-server.service
### Start / enable VMWare USB Arbitrator service
if command -v vmware-usbarbitrator.service > /dev/null; then
logg info 'Ensuring `vmware-usbarbitrator.service` is enabled and running'
logg info 'Ensuring vmware-usbarbitrator.service is enabled and running'
sudo systemctl enable vmware-usbarbitrator.service
sudo systemctl restart vmware-usbarbitrator.service
else
logg warn '`vmware-usbarbitrator` does not exist in the PATH'
logg warn 'vmware-usbarbitrator does not exist in the PATH'
fi
fi
else
@ -185,12 +185,12 @@ function vmwareSetup() {
else
logg info 'Generating Vagrant VMWare Utility certificates'
sudo vagrant-vmware-utility certificate generate
logg success 'Generated Vagrant VMWare Utility certificates via `vagrant-vmware-utility certificate generate`'
logg success 'Generated Vagrant VMWare Utility certificates via vagrant-vmware-utility certificate generate'
fi
logg info 'Ensuring the Vagrant VMWare Utility service is enabled'
sudo vagrant-vmware-utility service install || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg info 'The Vagrant VMWare Utility command `vagrant-vmware-utility service install` failed. It is probably already setup.'
logg info 'The Vagrant VMWare Utility command vagrant-vmware-utility service install failed. It is probably already setup.'
fi
fi
else

View file

@ -61,7 +61,7 @@ if [ -f "$GH_RUNNER_PATH/config.sh" ]; then
logg info 'Starting runner service'
"$GH_RUNNER_PATH/svc.sh" start && logg success 'Started the GitHub Actions runner service'
else
logg warn '`jq` is required by the GitHub runner configuration script'
logg warn 'jq is required by the GitHub runner configuration script'
fi
else
logg warn 'The GITHUB_TOKEN environment variable is not present'

View file

@ -154,7 +154,7 @@ EOT
fi
fi
else
logg info '`rclone` is not available'
logg info 'rclone is not available'
fi
{{ end -}}

View file

@ -88,9 +88,9 @@ if command -v smbd > /dev/null; then
chmod 775 "$HOME/Public"
chown -Rf {{ .user.username }}:rclone "$HOME/Public"
sudo sharing -a "$PRIVATE_SHARE" -S "Private (System)" -n "Private (System)" -g 000 -s 001 -E 1 -R 1 && logg success "Configured $PRIVATE_SHARE as a private Samba share" || logg info '`sharing` command failed - it is likely that the share was already set up'
sudo sharing -a "$PUBLIC_SHARE" -S "Public (System)" -n "Public (System)" -g 001 -s 001 -E 1 -R 0 && logg success "Configured $PUBLIC_SHARE as a public Samba share" || logg info '`sharing` command failed - it is likely that the share was already set up'
sudo sharing -a "$HOME/Public" -S "Public (User)" -n "Public (User)" -g 001 -s 001 -E 1 -R 0 && logg success "Configured $HOME/Public as a public Samba share" || logg info '`sharing` command failed - it is likely that the share was already set up'
sudo sharing -a "$PRIVATE_SHARE" -S "Private (System)" -n "Private (System)" -g 000 -s 001 -E 1 -R 1 && logg success "Configured $PRIVATE_SHARE as a private Samba share" || logg info 'sharing command failed - it is likely that the share was already set up'
sudo sharing -a "$PUBLIC_SHARE" -S "Public (System)" -n "Public (System)" -g 001 -s 001 -E 1 -R 0 && logg success "Configured $PUBLIC_SHARE as a public Samba share" || logg info 'sharing command failed - it is likely that the share was already set up'
sudo sharing -a "$HOME/Public" -S "Public (User)" -n "Public (User)" -g 001 -s 001 -E 1 -R 0 && logg success "Configured $HOME/Public as a public Samba share" || logg info 'sharing command failed - it is likely that the share was already set up'
else
logg info 'Ensuring /mnt for S3 buckets and Samba shares are configured'
@ -113,7 +113,7 @@ if command -v smbd > /dev/null; then
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/samba/config" "/etc/samba/smb.conf"
### Reload configuration file changes
logg info 'Reloading the `smbd` config'
logg info 'Reloading the smbd config'
smbcontrol smbd reload-config
fi
else

View file

@ -49,9 +49,9 @@
if [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json" ]; then
if [ -d "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/node_modules" ]; then
logg info 'Skipping Tabby plugin installation because it looks like the plugins were already installed since `node_modules` is present in ~/.config/tabby/plugins'
logg info 'Skipping Tabby plugin installation because it looks like the plugins were already installed since node_modules is present in ~/.config/tabby/plugins'
else
logg info 'Installing Tabby plugins defined in `'"${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json"'`'
logg info 'Installing Tabby plugins defined in '"${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins/package.json"''
cd "${XDG_CONFIG_HOME:-$HOME/.config}/tabby/plugins"
npm install --quiet
logg success 'Finished installing Tabby plugins'

View file

@ -45,12 +45,12 @@ if command -v netdata-claim.sh > /dev/null; then
else
# Linux
if [ -d /sys/kernel/mm/ksm ]; then
logg info 'Adding Netdata kernel optimization for `/sys/kernel/mm/ksm/run`'
logg info 'Adding Netdata kernel optimization for /sys/kernel/mm/ksm/run'
echo 1 | sudo tee /sys/kernel/mm/ksm/run
logg info 'Adding Netdata kernel optimization for `/sys/kernel/mm/ksm/sleep_millisecs`'
logg info 'Adding Netdata kernel optimization for /sys/kernel/mm/ksm/sleep_millisecs'
echo 1000 | sudo tee /sys/kernel/mm/ksm/sleep_millisecs
else
logg info 'The `/sys/kernel/mm/ksm` directory does not exist so Netdata kernel optimizations are not being applied'
logg info 'The /sys/kernel/mm/ksm directory does not exist so Netdata kernel optimizations are not being applied'
fi
fi
@ -78,7 +78,7 @@ if command -v netdata-claim.sh > /dev/null; then
logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/netdata/health_alarm_notify.conf to $NETDATA_LIB/conf.d/health_alarm_notify.conf"
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/netdata/health_alarm_notify.conf" "$NETDATA_LIB/conf.d/health_alarm_notify.conf"
else
logg warn '`netdata` is not available in the PATH or is not installed'
logg warn 'netdata is not available in the PATH or is not installed'
fi
### Ensure the apt command is available before running `debsecan` logic
@ -108,7 +108,7 @@ if command -v netdata-claim.sh > /dev/null; then
sudo "$DEBSECAN_GIT/debsecan.chart.py" /usr/libexec/netdata/python.d/debsecan.chart.py
sudo "$DEBSECAN_GIT/debsecan.conf" /etc/netdata/python.d/debsecan.conf
else
logg warn '`apt-get` is available but `debsecan` is not available in the PATH or is not installed'
logg warn 'apt-get is available but debsecan is not available in the PATH or is not installed'
fi
fi
@ -135,7 +135,7 @@ if command -v netdata-claim.sh > /dev/null; then
logg warn "Failed to find appropriate directory to add Netdata speedtest chart script"
fi
else
logg warn '`speedtest-cli` is not available in the PATH or is not installed'
logg warn 'speedtest-cli is not available in the PATH or is not installed'
fi
ensureNetdataOwnership
@ -150,11 +150,11 @@ if command -v netdata-claim.sh > /dev/null; then
logg info 'Starting / enabling netdata service'
brew services restart netdata
else
logg warn '`systemctl` is not available'
logg warn 'systemctl is not available'
fi
else
logg info '`netdata-claim.sh` is not available in the PATH'
logg info 'netdata-claim.sh is not available in the PATH'
fi
{{ end -}}

View file

@ -13,11 +13,11 @@
if [ -d /Applications ] && [ -d System ]; then
# macOS
if command -v tailscaled > /dev/null; then
logg info 'Ensuring `tailscaled` system daemon is installed'
logg info 'Ensuring tailscaled system daemon is installed'
sudo tailscaled install-system-daemon
logg info '`tailscaled` system daemon is now installed and will load on boot'
logg info 'tailscaled system daemon is now installed and will load on boot'
else
logg info '`tailscaled` does not appear to be installed'
logg info 'tailscaled does not appear to be installed'
fi
fi
@ -27,7 +27,7 @@ if command -v tailscale > /dev/null && [ "$TAILSCALE_AUTH_KEY" != "" ]; then
logg info 'Connecting to Tailscale with user-defined authentication key'
timeout 14 tailscale up --authkey="$TAILSCALE_AUTH_KEY" --accept-routes || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg warn '`tailscale up` timed out'
logg warn 'tailscale up timed out'
else
logg success 'Connected to Tailscale network'
fi

View file

@ -32,15 +32,15 @@ fi
if command -v update-alternatives > /dev/null; then
if [ -f "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" ]; then
sudo update-alternatives --install /usr/share/plymouth/themes/default.plymouth default.plymouth "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" 100
logg success 'Installed `default.plymouth`'
logg success 'Installed default.plymouth'
# Required sometimes
sudo update-alternatives --set default.plymouth "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth"
logg success 'Set `default.plymouth`'
logg success 'Set default.plymouth'
else
logg warn "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth does not exist!"
fi
else
logg warn '`update-alternatives` is not available'
logg warn 'update-alternatives is not available'
fi
### Update /etc/plymouth/plymouthd.conf
@ -66,12 +66,12 @@ fi
if command -v plymouth-set-default-theme > /dev/null; then
sudo plymouth-set-default-theme -R '{{ .theme }}' || EXIT_CODE=$?
if [ -n "$EXIT_CODE" ]; then
logg warn 'There may have been an issue while setting the Plymouth default theme with `plymouth-set-default-theme`'
logg warn 'There may have been an issue while setting the Plymouth default theme with plymouth-set-default-theme'
else
logg success 'Set Plymouth default theme with `plymouth-set-default-theme`'
logg success 'Set Plymouth default theme with plymouth-set-default-theme'
fi
else
logg warn 'Could not apply default Plymouth theme because `plymouth-set-default-theme` is missing'
logg warn 'Could not apply default Plymouth theme because plymouth-set-default-theme is missing'
fi
### Apply update-alternatives (again - required sometimes)
@ -79,27 +79,27 @@ if command -v update-alternatives > /dev/null; then
if [ -f "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth" ]; then
# Required sometimes
sudo update-alternatives --set default.plymouth "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth"
logg success 'Set `default.plymouth` (second time is required sometimes)'
logg success 'Set default.plymouth (second time is required sometimes)'
else
logg warn "/usr/local/share/plymouth/themes/{{ .theme }}/{{ .theme }}.plymouth does not exist!"
fi
else
logg warn '`update-alternatives` is not available'
logg warn 'update-alternatives is not available'
fi
### Update kernel / initrd images
# Set `export DEBUG_MODE=true` to bypass GRUB2 / Plymouth application
if [ "$DEBUG_MODE" != 'true' ]; then
if command -v update-initramfs > /dev/null; then
logg info 'Running `sudo update-initramfs -u`'
logg info 'Running sudo update-initramfs -u'
sudo update-initramfs -u
logg success 'Updated kernel / initrd images for Plymouth'
elif command -v dracut > /dev/null; then
logg info 'Running `sudo dracut --regenerate-all -f`'
logg info 'Running sudo dracut --regenerate-all -f'
sudo dracut --regenerate-all -f
logg success 'Updated kernel / initrd images for Plymouth'
else
logg warn 'Unable to update kernel / initrd images because neither `update-initramfs` or `dracut` are available'
logg warn 'Unable to update kernel / initrd images because neither update-initramfs or dracut are available'
fi
fi

View file

@ -175,7 +175,7 @@ if [ "$DEBUG_MODE" != 'true' ]; then
logg success 'Applied GRUB2 theme'
fi
elif [ -f /usr/sbin/update-grub ]; then
logg info 'Running `sudo update-grub`'
logg info 'Running sudo update-grub'
sudo update-grub
else
logg warn 'Unable to find appropriate GRUB mkconfig command'

Some files were not shown because too many files have changed in this diff Show more