neko/.docker/files/chromium/test

30 lines
1.0 KiB
Plaintext
Raw Normal View History

2020-01-30 20:19:57 +13:00
#!/bin/bash
#
# chromium
mkdir -p /etc/chromium/policies/managed
# https://cloud.google.com/docs/chrome-enterprise/policies/
cp files/chromium/policies.json /etc/chromium/policies/managed/policies.json
#rm -f /etc/chromium/policies/managed/policies.json
cp files/chromium/preferences.json /usr/share/chromium/master_preferences
#rm -f /usr/share/chromium/master_preferences
cp files/chromium/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 "https://dl.google.com/widevine-cdm/$WIDEVINE_VERSION-linux-x64.zip" -O /tmp/widevine.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