This commit is contained in:
Brian Zalewski 2023-06-14 07:06:20 +00:00
parent 2cc8007561
commit 8a91bb7875
3 changed files with 19 additions and 15 deletions

View file

@ -53,7 +53,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 logg '`privoxy` is missing from the PATH - skipping configuration'
fi
{{ end -}}

View file

@ -8,6 +8,6 @@
### Run the VIM plugin install routine
if command -v vim > /dev/null; then
vim +PlugInstall +qall
vim +PlugInstall +qall 2>/dev/null
fi
{{ end -}}

View file

@ -30,6 +30,7 @@
### Ensure Chrome policies directory is present
for POLICY_DIR in "/opt/google/chrome/policies" "/etc/chromium/policies" "/etc/brave/policies"; do
if [ -d "$(dirname "$POLICY_DIR")" ]; then
### Managed policies
if [ ! -f "$POLICY_DIR/managed/policies.json" ]; then
logg info "Ensuring directory $POLICY_DIR/managed exists"
@ -45,6 +46,9 @@ for POLICY_DIR in "/opt/google/chrome/policies" "/etc/chromium/policies" "/etc/b
logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/chrome/recommended.json to $POLICY_DIR/recommended/policies.json"
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/chrome/recommended.json" "$POLICY_DIR/recommended/policies.json"
fi
else
logg info "Skipping extension injection into $POLICY_DIR - create these folders prior to running to create managed configs"
fi
done
### Add Chrome extension JSON