From 8f6dee8687335dfa2d356c5932897dfe0b910ac5 Mon Sep 17 00:00:00 2001 From: Brian Zalewski Date: Thu, 16 Feb 2023 02:31:52 +0000 Subject: [PATCH] Update 7 files - /home/.chezmoiscripts/universal/run_onchange_after_14-warp.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_24-vpn-linux.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_27-tor.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.tmpl - /home/.chezmoiscripts/universal/run_onchange_after_45-vmware.tmpl - /home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl - /home/dot_config/shell/exports.sh.tmpl --- home/.chezmoiscripts/universal/run_onchange_after_14-warp.tmpl | 2 +- .../universal/run_onchange_after_24-vpn-linux.tmpl | 2 +- home/.chezmoiscripts/universal/run_onchange_after_27-tor.tmpl | 2 +- .../universal/run_onchange_after_28-privoxy.tmpl | 2 +- .../.chezmoiscripts/universal/run_onchange_after_45-vmware.tmpl | 2 +- .../universal/run_onchange_before_11-install-docker.tmpl | 2 +- home/dot_config/shell/exports.sh.tmpl | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/home/.chezmoiscripts/universal/run_onchange_after_14-warp.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_14-warp.tmpl index 9ed0f854..88af3217 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_14-warp.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_14-warp.tmpl @@ -2,7 +2,7 @@ #!/usr/bin/env bash ### Configure CloudFlare WARP (if not WSL and warp-cli is installed) -if [[ ! "$(grep Microsoft /proc/version)" ]] && command -v warp-cli > /dev/null; then +if [[ ! "$(grep Microsoft /proc/version > /dev/null)" ]] && command -v warp-cli > /dev/null; then ### Register CloudFlare WARP if warp-cli --accept-tos status | grep 'Registration missing' > /dev/null; then logg info 'Registering CloudFlare WARP' diff --git a/home/.chezmoiscripts/universal/run_onchange_after_24-vpn-linux.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_24-vpn-linux.tmpl index 5983813e..5d2c3b8e 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_24-vpn-linux.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_24-vpn-linux.tmpl @@ -87,7 +87,7 @@ if command -v nmcli > /dev/null; then fi ### Restart NetworkManager if changes were made and environment is not WSL - if [ "$RESTART_NM" == 'true' ] && [[ ! "$(grep Microsoft /proc/version)" ]]; then + if [ "$RESTART_NM" == 'true' ] && [[ ! "$(grep Microsoft /proc/version > /dev/null)" ]]; then logg info 'Restarting NetworkManager since VPN profiles were updated' sudo service NetworkManager restart fi diff --git a/home/.chezmoiscripts/universal/run_onchange_after_27-tor.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_27-tor.tmpl index 2148c338..264a24a3 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_27-tor.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_27-tor.tmpl @@ -28,7 +28,7 @@ if command -v toron > /dev/null; then # macOS brew services restart tor else - if [[ ! "$(grep Microsoft /proc/version)" ]]; then + if [[ ! "$(grep Microsoft /proc/version > /dev/null)" ]]; then # Linux sudo systemctl enable tor sudo systemctl restart tor diff --git a/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.tmpl index 8a42ab04..3defb0e4 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_28-privoxy.tmpl @@ -28,7 +28,7 @@ if command -v privoxy > /dev/null; then # macOS brew services restart privoxy else - if [[ ! "$(grep Microsoft /proc/version)" ]]; then + if [[ ! "$(grep Microsoft /proc/version > /dev/null)" ]]; then # Linux sudo systemctl enable privoxy sudo systemctl restart privoxy diff --git a/home/.chezmoiscripts/universal/run_onchange_after_45-vmware.tmpl b/home/.chezmoiscripts/universal/run_onchange_after_45-vmware.tmpl index 3db46d28..f649532e 100644 --- a/home/.chezmoiscripts/universal/run_onchange_after_45-vmware.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_after_45-vmware.tmpl @@ -56,7 +56,7 @@ if command -v vmware > /dev/null; then logg info '/usr/lib/vmware/isoimages/darwin.iso is already present on the system so VMware macOS unlocking will not be performed' fi - if [[ ! "$(grep Microsoft /proc/version)" ]]; then + if [[ ! "$(grep Microsoft /proc/version > /dev/null)" ]]; then ### Start / enable VMWare service logg info 'Ensuring `vmware.service` is enabled and running' sudo systemctl enable vmware.service diff --git a/home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl b/home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl index faef1299..ba063f07 100644 --- a/home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl +++ b/home/.chezmoiscripts/universal/run_onchange_before_11-install-docker.tmpl @@ -177,7 +177,7 @@ if [ ! -d /Applications ] || [ ! -d /System ]; then fi # Restart / enable Docker - if [[ ! "$(grep Microsoft /proc/version)" ]] && command -v systemctl > /dev/null; then + if [[ ! "$(grep Microsoft /proc/version > /dev/null)" ]] && command -v systemctl > /dev/null; then logg info 'Restarting Docker service' sudo systemctl restart docker.service sudo systemctl restart containerd.service diff --git a/home/dot_config/shell/exports.sh.tmpl b/home/dot_config/shell/exports.sh.tmpl index 3ac7f99c..230f78ab 100644 --- a/home/dot_config/shell/exports.sh.tmpl +++ b/home/dot_config/shell/exports.sh.tmpl @@ -358,7 +358,7 @@ fi export BROWSER=brave ### WSL -if [[ "$(grep Microsoft /proc/version)" ]]; then +if [ -d /proc ] && [[ "$(grep Microsoft /proc/version > /dev/null)" ]]; then # Source: https://stackoverflow.com/questions/61110603/how-to-set-up-working-x11-forwarding-on-wsl2 export LIBGL_ALWAYS_INDIRECT="1" export DISPLAY=$(ip route list default | awk '{print $3}'):0