2024-02-05 19:54:17 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# This script will create the direcories or symlinks that browsers look for
|
|
|
|
# their policies. The user is trusted to setup those manually.
|
|
|
|
set -x
|
|
|
|
|
|
|
|
# Firefox and LibreWolf (caution! https://codeberg.org/librewolf/issues/issues/1767)
|
2024-04-29 11:25:17 +02:00
|
|
|
mkdir -vp /etc/firefox/policies
|
|
|
|
chmod -v a+rx /etc/firefox/
|
|
|
|
chmod -v a+rx /etc/firefox/policies/
|
|
|
|
touch /etc/firefox/policies/policies.json
|
|
|
|
chmod -v a+r /etc/firefox/policies/policies.json
|
|
|
|
printf "WARNING! LibreWolf default profile may be masked!\nhttps://codeberg.org/librewolf/issues/issues/1767\n"
|
2024-02-05 19:54:17 +01:00
|
|
|
|
2024-02-14 10:25:44 +01:00
|
|
|
# Firefox ESR
|
2024-04-29 11:25:17 +02:00
|
|
|
ln -sfv /etc/firefox /etc/firefox-esr
|
2024-02-14 10:25:44 +01:00
|
|
|
|
2024-02-05 19:54:17 +01:00
|
|
|
# Chromium
|
2024-04-29 11:25:17 +02:00
|
|
|
mkdir -vp /etc/opt/chromium/policies/managed
|
|
|
|
chmod -v a+rx /etc/opt/chromium/policies/
|
|
|
|
mkdir -vp /etc/opt/chromium/policies/recommended
|
|
|
|
chmod -v a+rx /etc/opt/chromium/policies/{managed,recommended}/
|
2024-02-05 19:54:17 +01:00
|
|
|
|
|
|
|
# Brave
|
2024-04-29 11:25:17 +02:00
|
|
|
ln -sfv /etc/opt/chromium /etc/brave
|
2024-02-05 19:54:17 +01:00
|
|
|
|
|
|
|
# Vivaldi
|
2024-04-29 11:25:17 +02:00
|
|
|
ln -sfv /etc/opt/chromium /etc/chromium
|
2024-02-05 19:54:17 +01:00
|
|
|
|
|
|
|
# Google Chrome
|
2024-04-29 11:25:17 +02:00
|
|
|
ln -sfv /etc/opt/chromium /etc/opt/chrome
|
2024-02-05 19:54:17 +01:00
|
|
|
|
|
|
|
# Microsoft Edge
|
2024-04-29 11:15:26 +02:00
|
|
|
# NOTE! It breaks chrome:// URLs so the recommended policy apps as new tab page
|
|
|
|
# won't work and wants to open Firefox instead, so I am managing the recommended
|
|
|
|
# policy separately
|
2024-04-29 11:25:17 +02:00
|
|
|
#ln -sfv /etc/opt/chromium /etc/opt/edge
|
|
|
|
mkdir -vp /etc/opt/edge/policies/recommended
|
|
|
|
ln -sfv /etc/opt/chromium/policies/managed /etc/opt/edge/policies/managed
|
|
|
|
printf "WARNING! Edge recommended profiles are managed separately.\n"
|
2024-02-05 19:54:17 +01:00
|
|
|
|
|
|
|
set +x
|