forked from Envek/dockerized-browser-streamer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchrome.sh
More file actions
executable file
·30 lines (24 loc) · 796 Bytes
/
Copy pathchrome.sh
File metadata and controls
executable file
·30 lines (24 loc) · 796 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
set -xeo pipefail
# Install additional CA certificates to shared PKI store for Chrome (e.g. for development)
mkdir -p ~/ca/
shopt -s nullglob
if [ -n "$CA_CERT" ]; then
echo "$CA_CERT" > ~/ca/"${CA_CERT_NAME:-'environment'}".crt
fi
mkdir -p $HOME/.pki/nssdb
certutil -d $HOME/.pki/nssdb -N --empty-password
for CAcert in ~/ca/*.crt; do
filename=$(basename $CAcert)
certutil -A -n "${filename%.*}" -t "TCu,Cuw,Tuw" -i ${CAcert} -d sql:$HOME/.pki/nssdb
done
# Create a new Chrome profile
mkdir -p /tmp/chrome-profile
# Start Chrome browser and point it at the URL we want to capture
exec google-chrome \
--window-size=${SCREEN_WIDTH},${SCREEN_HEIGHT} \
--no-sandbox \
--disable-sync \
--no-first-run \
--user-data-dir=/tmp/chrome-profile \
--kiosk "${MEETING_URL}"