Live video on the AT Protocol
1#!/bin/sh
2
3set -e
4
5# Create streamplace group if it doesn't exist
6if ! getent group streamplace >/dev/null; then
7 groupadd streamplace
8fi
9
10# Create streamplace user if it doesn't exist
11if ! getent passwd streamplace >/dev/null; then
12 useradd -r -g streamplace -d /var/lib/streamplace -s /sbin/nologin streamplace
13fi
14
15mkdir -p /var/lib/streamplace
16mkdir -p /etc/streamplace
17chown -R streamplace:streamplace /var/lib/streamplace
18
19# Create default environment file if it doesn't exist
20if [ ! -f /etc/streamplace/streamplace.env ]; then
21 cat <<EOF > /etc/streamplace/streamplace.env
22# Configure your Streamplace instance by creating lines such as:
23#
24# SP_BROADCASTER_HOST=example.com
25#
26# If you have a multi-node cluster, they'll each need different public DNS names:
27#
28# SP_SERVER_HOST=prod-nyc0.example.com
29#
30# If you want your Streamplace node handle default HTTP and HTTPS traffic for the server, uncomment these:
31#
32# SP_HTTP_ADDR=:80
33# SP_HTTPS_ADDR=:443
34# SP_SECURE=true
35# Useful if your TLS cert and key aren't in the default:
36#
37# SP_TLS_CERT=/tls/tls.crt
38# SP_TLS_KEY=/tls/tls.key
39EOF
40fi