neko/.docker/files/chromium/test

35 lines
1.1 KiB
Plaintext
Raw Normal View History

2020-01-30 20:19:57 +13:00
#!/bin/bash
2020-02-01 10:45:58 +13:00
set -eux
2020-01-31 13:42:05 +13:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
2020-01-30 20:19:57 +13:00
#
# chromium
mkdir -p /etc/chromium/policies/managed
# https://cloud.google.com/docs/chrome-enterprise/policies/
2020-01-31 13:42:05 +13:00
cp $DIR/policies.json /etc/chromium/policies/managed/policies.json
2020-01-30 20:19:57 +13:00
#rm -f /etc/chromium/policies/managed/policies.json
2020-01-31 13:42:05 +13:00
cp $DIR/preferences.json /usr/share/chromium/master_preferences
2020-01-30 20:19:57 +13:00
#rm -f /usr/share/chromium/master_preferences
2020-01-31 13:42:05 +13:00
cp $DIR/supervisord.conf /etc/neko/supervisord/chromium.conf
2020-01-30 20:19:57 +13:00
#rm -f /etc/neko/supervisord/firefox.conf
2020-01-31 13:42:05 +13:00
#
2020-01-30 20:19:57 +13:00
# 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)
2020-01-31 13:42:05 +13:00
wget -O /tmp/widevine.zip "https://dl.google.com/widevine-cdm/$WIDEVINE_VERSION-linux-x64.zip"
2020-01-30 20:19:57 +13:00
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