Archived
2
0
This repository has been archived on 2024-06-24. You can view files and clone it, but cannot push or open issues or pull requests.
neko-custom/.docker/files/chromium/test
2020-01-31 00:42:05 +00:00

33 lines
1.0 KiB
Bash
Executable File

#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
#
# chromium
mkdir -p /etc/chromium/policies/managed
# https://cloud.google.com/docs/chrome-enterprise/policies/
cp $DIR/policies.json /etc/chromium/policies/managed/policies.json
#rm -f /etc/chromium/policies/managed/policies.json
cp $DIR/preferences.json /usr/share/chromium/master_preferences
#rm -f /usr/share/chromium/master_preferences
cp $DIR/supervisord.conf /etc/neko/supervisord/chromium.conf
#rm -f /etc/neko/supervisord/firefox.conf
#
# install widevine module
if [ ! -f /usr/lib/chromium/libwidevinecdm.so ]; then
WIDEVINE_VERSION=$(wget --quiet -O - https://dl.google.com/widevine-cdm/versions.txt | tail -n 1)
wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/$WIDEVINE_VERSION-linux-x64.zip"
unzip -p /tmp/widevine.zip libwidevinecdm.so > /usr/lib/chromium/libwidevinecdm.so
chmod 644 /usr/lib/chromium/libwidevinecdm.so
rm /tmp/widevine.zip
fi
#
# clean up old sessions
rm -rf /home/$USER/.cache/chromium
rm -rf /home/$USER/.config/chromium