forked from siomiz/chrome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
crdonly
19 lines (15 loc) · 838 Bytes
/
crdonly
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# make sure to install a new version of ~/.chrome-remote-desktop-session
# where ~ is a volume
cp /crd-session /home/chrome/.chrome-remote-desktop-session
# delete obsolete pulseaudio sockets if left from previous sessions
rm -rf /home/chrome/.config/chrome-remote-desktop/pulseaudio*
# only keep 1 host#*.json config file
# (default is to use md5 of hostname, which changes on every docker run)
if test -n "$(find /home/chrome/.config/chrome-remote-desktop -name 'host#*.json' -print -quit)"
then
mv `ls -t /home/chrome/.config/chrome-remote-desktop/host#*.json | head -n 1` /home/chrome/.config/chrome-remote-desktop/~host.json
rm /home/chrome/.config/chrome-remote-desktop/host#*.json
fi
# start supervisor to watch `chrome-remote-desktop` only
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord-crdonly.conf