Latest
This commit is contained in:
parent
2cc8007561
commit
8a91bb7875
3 changed files with 19 additions and 15 deletions
|
@ -53,7 +53,7 @@ if command -v privoxy > /dev/null; then
|
||||||
logg warn 'The '"$PRIVOXY_CONFIG_DIR"' directory is missing'
|
logg warn 'The '"$PRIVOXY_CONFIG_DIR"' directory is missing'
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
logg warn '`privoxy` is missing from the PATH'
|
logg logg '`privoxy` is missing from the PATH - skipping configuration'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
|
@ -8,6 +8,6 @@
|
||||||
|
|
||||||
### Run the VIM plugin install routine
|
### Run the VIM plugin install routine
|
||||||
if command -v vim > /dev/null; then
|
if command -v vim > /dev/null; then
|
||||||
vim +PlugInstall +qall
|
vim +PlugInstall +qall 2>/dev/null
|
||||||
fi
|
fi
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
|
@ -30,20 +30,24 @@
|
||||||
|
|
||||||
### Ensure Chrome policies directory is present
|
### Ensure Chrome policies directory is present
|
||||||
for POLICY_DIR in "/opt/google/chrome/policies" "/etc/chromium/policies" "/etc/brave/policies"; do
|
for POLICY_DIR in "/opt/google/chrome/policies" "/etc/chromium/policies" "/etc/brave/policies"; do
|
||||||
### Managed policies
|
if [ -d "$(dirname "$POLICY_DIR")" ]; then
|
||||||
if [ ! -f "$POLICY_DIR/managed/policies.json" ]; then
|
### Managed policies
|
||||||
logg info "Ensuring directory $POLICY_DIR/managed exists"
|
if [ ! -f "$POLICY_DIR/managed/policies.json" ]; then
|
||||||
sudo mkdir -p "$POLICY_DIR/managed"
|
logg info "Ensuring directory $POLICY_DIR/managed exists"
|
||||||
logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/chrome/managed.json to $POLICY_DIR/managed/policies.json"
|
sudo mkdir -p "$POLICY_DIR/managed"
|
||||||
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/chrome/managed.json" "$POLICY_DIR/managed/policies.json"
|
logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/chrome/managed.json to $POLICY_DIR/managed/policies.json"
|
||||||
fi
|
sudo cp -f "${XDG_CONFIG_HOME:-$HOME/.config}/chrome/managed.json" "$POLICY_DIR/managed/policies.json"
|
||||||
|
fi
|
||||||
|
|
||||||
### Recommended policies
|
### Recommended policies
|
||||||
if [ ! -f "$POLICY_DIR/recommended/policies.json" ]; then
|
if [ ! -f "$POLICY_DIR/recommended/policies.json" ]; then
|
||||||
logg info "Ensuring directory $POLICY_DIR/recommended exists"
|
logg info "Ensuring directory $POLICY_DIR/recommended exists"
|
||||||
sudo mkdir -p "$POLICY_DIR/recommended"
|
sudo mkdir -p "$POLICY_DIR/recommended"
|
||||||
logg info "Copying ${XDG_CONFIG_HOME:-$HOME/.config}/chrome/recommended.json to $POLICY_DIR/recommended/policies.json"
|
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"
|
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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue