move to s6 overlay structure (#13)

* move to s6 overlay structure

* Use alpine:latest and latest s6

* cleanup Dockerfile

* use .env file on docker run

* change mappings so all under one folder

* Update README

* change cron default to hourly to keep things updated

* add section about editing xteve settings

* add nice 'logging' to stdout
This commit is contained in:
taylorbourne
2020-03-05 11:13:14 -08:00
committed by GitHub
parent 7a7cfd1a56
commit 3a11a46f09
23 changed files with 1676 additions and 262 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/with-contenv bash
groupmod -o -g "$PGID" abc
usermod -o -u "$PUID" abc
echo '
-------------------------------------
GID/UID
-------------------------------------'
echo "
User uid: $(id -u abc)
User gid: $(id -g abc)
-------------------------------------
"

View File

@@ -0,0 +1,11 @@
#!/usr/bin/with-contenv bash
cp /defaults/sample_cron.txt /config/sample_cron.txt
cp -n /defaults/xteve-settings.json /xteve/settings.json
mkdir -p /playlists/lazystream/
cp -n /defaults/lazystream-mlb.m3u /playlists/lazystream/lazystream-mlb.m3u
cp -n /defaults/lazystream-mlb.xml /playlists/lazystream/lazystream-mlb.xml
cp -n /defaults/lazystream-nhl.m3u /playlists/lazystream/lazystream-nhl.m3u
cp -n /defaults/lazystream-nhl.xml /playlists/lazystream/lazystream-nhl.xml

View File

@@ -0,0 +1,33 @@
#!/usr/bin/with-contenv bash
function prepend() {
while read line;
do echo "${1}${line}";
done;
}
exec 1> >(prepend "[update-hosts] ")
# Update hosts file
export IP=$(getent ahostsv4 freegamez.ga | awk '{ print $1 }' | head -1)
echo $IP playback.svcs.mlb.com >> /etc/hosts
echo $IP mf.svc.nhl.com >> /etc/hosts
echo $IP mlb-ws-mf.media.mlb.com >> /etc/hosts
cat /etc/hosts
# Update certs
rm -f /home/abc/.gnutls/known_hosts
rm -f /root/.gnutls/known_hosts
printf 'y\n' | gnutls-cli --tofu playback.svcs.mlb.com:443
printf 'y\n' | gnutls-cli --tofu mf.svc.nhl.com:443
printf 'y\n' | gnutls-cli --tofu mlb-ws-mf.media.mlb.com:443
install -D /root/.gnutls/known_hosts /home/abc/.gnutls/known_hosts
rm -rf /root/.gnutls
cat /home/abc/.gnutls/known_hosts

View File

@@ -0,0 +1,9 @@
#!/usr/bin/with-contenv bash
chown -R abc:abc /config
chown -R abc:abc /playlists
chown -R abc:abc /guide2go
chown -R abc:abc /xteve
chown -R abc:abc /tmp/xteve
chown -R abc:abc /home/abc