diff --git a/home/dot_local/bin/post-installx/executable_post-clamav.sh b/home/dot_local/bin/post-installx/executable_post-clamav.sh index 3fa785ca..c5fc098f 100644 --- a/home/dot_local/bin/post-installx/executable_post-clamav.sh +++ b/home/dot_local/bin/post-installx/executable_post-clamav.sh @@ -31,6 +31,7 @@ if command -v freshclam > /dev/null; then logg info 'Unloading previous ClamAV clamdscan configuration' sudo launchctl unload /Library/LaunchDaemons/clamdscan.plist fi + logg info 'Running sudo launchctl load -w /Library/LaunchDaemons/clamdscan.plist' sudo launchctl load -w /Library/LaunchDaemons/clamdscan.plist if sudo launchctl list | grep 'clamav.freshclam' > /dev/null; then logg info 'Unloading previous ClamAV freshclam configuration' @@ -41,6 +42,7 @@ if command -v freshclam > /dev/null; then fi ### Update database + logg info 'Running freshclam to update database' freshclam else logg info 'freshclam is not available in the PATH' diff --git a/home/dot_local/bin/post-installx/executable_post-envchain.sh b/home/dot_local/bin/post-installx/executable_post-envchain.sh index d1b5849b..ebec2351 100644 --- a/home/dot_local/bin/post-installx/executable_post-envchain.sh +++ b/home/dot_local/bin/post-installx/executable_post-envchain.sh @@ -16,8 +16,10 @@ if command -v envchain > /dev/null; then if [ -f "$HOME/.config/age/chezmoi.txt" ]; then logg info 'Importing environment variables into the System keyring' for file in {{ joinPath .chezmoi.sourceDir ".chezmoitemplates" "secrets" "*" }}; do + logg info "Adding $file to System keyring via envchain" cat "$file" | chezmoi decrypt | envchain -s default "$(basename $file)" > /dev/null || logg info 'Importing "$(basename $file)" failed' done + logg success "Added Chezmoi-managed secrets into System keyring via envchain" else logg warn 'Unable to import any variables into envchain because ~/.config/age/chezmoi.txt was not created by the secrets encryption process yet' fi diff --git a/home/dot_local/bin/post-installx/executable_post-fail2ban.sh b/home/dot_local/bin/post-installx/executable_post-fail2ban.sh index 6f5d658e..65014c5a 100644 --- a/home/dot_local/bin/post-installx/executable_post-fail2ban.sh +++ b/home/dot_local/bin/post-installx/executable_post-fail2ban.sh @@ -28,7 +28,7 @@ if command -v fail2ban-client > /dev/null; then fi if [ -d /Applications ] && [ -d /System ]; then ### macOS - logg info 'Enabling the fail2ban Homebrew service' && brew services restart fail2ban + logg info 'Enabling the fail2ban Homebrew service' && sudo brew services restart fail2ban else ### Linux logg info 'Enabling the fail2ban service' && sudo systemctl enable fail2ban diff --git a/home/dot_local/bin/post-installx/executable_post-tailscale.sh b/home/dot_local/bin/post-installx/executable_post-tailscale.sh index 70071bcb..2fb9e1f0 100644 --- a/home/dot_local/bin/post-installx/executable_post-tailscale.sh +++ b/home/dot_local/bin/post-installx/executable_post-tailscale.sh @@ -56,6 +56,8 @@ if [ -n "$TAILSCALE_AUTH_KEY" ] && [ "$TAILSCALE_AUTH_KEY" != "" ]; then if [ -n "$EXIT_CODE" ]; then logg warn '/Applications/Tailscale.app/Contents/MacOS/Tailscale timed out' fi + logg info 'Disabling update check' + /Applications/Tailscale.app/Contents/MacOS/Tailscale set --update-check=false elif command -v tailscale > /dev/null && [ "$TAILSCALE_AUTH_KEY" != "" ]; then logg info 'Connecting to Tailscale with user-defined authentication key (TAILSCALE_AUTH_KEY)' timeout 30 tailscale up --authkey="$TAILSCALE_AUTH_KEY" --accept-routes || EXIT_CODE=$? @@ -64,6 +66,10 @@ if [ -n "$TAILSCALE_AUTH_KEY" ] && [ "$TAILSCALE_AUTH_KEY" != "" ]; then else logg success 'Connected to Tailscale network' fi + logg info 'Disabling notifications about updates' + tailscale set --update-check=false + logg info 'Setting tailscale to auto-update' + tailscale set --auto-update else logg info 'tailscale does not appear to be installed' fi diff --git a/home/dot_local/bin/post-installx/executable_post-tor.sh b/home/dot_local/bin/post-installx/executable_post-tor.sh index 912c2a4e..2949bf3c 100644 --- a/home/dot_local/bin/post-installx/executable_post-tor.sh +++ b/home/dot_local/bin/post-installx/executable_post-tor.sh @@ -38,6 +38,12 @@ if command -v torify > /dev/null; then if [ -d "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/tor" ] && [ ! -f "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/tor/torrc" ]; then logg info "Symlinking /usr/local/etc/tor/torrc to ${HOMEBREW_PREFIX:-/opt/homebrew}/etc/tor/torrc" ln -s /usr/local/etc/tor/torrc "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/tor/torrc" + else + if [ -L "${HOMEBREW_PREFIX:-/opt/homebrew}/etc/tor/torrc" ]; then + logg info ""${HOMEBREW_PREFIX:-/opt/homebrew}/etc/tor/torrc" symlinked" + else + logg warn ""${HOMEBREW_PREFIX:-/opt/homebrew}/etc/tor/torrc" not symlinked!" + fi fi logg info 'Running brew services restart tor' brew services restart tor && logg success 'Tor successfully restarted'