television/init.sh

37 lines
881 B
Bash
Raw Normal View History

2024-01-04 15:57:03 -05:00
#!/bin/bash
echo "creating data dir structure"
2024-06-28 19:01:28 -04:00
# certbot
mkdir -v -p data/certbot/etc
mkdir -v -p data/certbot/var
mkdir -v -p logs/certbot
mkdir -v -p data/certificates
# restreamer
2024-01-04 15:57:03 -05:00
mkdir -v -p data/restreamer/config
mkdir -v -p data/restreamer/data
2024-06-28 19:01:28 -04:00
# scheduler
2024-01-04 15:57:03 -05:00
mkdir -v -p data/recorder/vod
mkdir -v -p data/recorder/live
mkdir -v -p data/recorder/thumb
2024-01-04 15:57:03 -05:00
2024-06-28 19:01:28 -04:00
# icecast
mkdir -v -p logs/icecast
touch logs/icecast/access.log
touch logs/icecast/error.log
chown 1000:1000 logs/icecast/access.log
chown 1000:1000 logs/icecast/error.log
2024-01-04 15:57:03 -05:00
echo "generating self signed certificates for haproxy bootstrap"
cd data/certificates
openssl genrsa -out default.key 2048
openssl req -new -key default.key -out default.csr
openssl x509 -req -days 3650 -in default.csr -signkey default.key -out default.crt
cat default.key default.crt >> default.pem
rm default.key
rm default.csr
rm default.crt