]>
Commit | Line | Data |
---|---|---|
1 | #!/bin/sh | |
2 | set -e | |
3 | ||
4 | # Process the nginx template | |
5 | SOURCE_FILE="/etc/nginx/conf.d/peertube.template" | |
6 | TARGET_FILE="/etc/nginx/conf.d/default.conf" | |
7 | export WEBSERVER_HOST="$PEERTUBE_WEBSERVER_HOSTNAME" | |
8 | export PEERTUBE_HOST="peertube:9000" | |
9 | ||
10 | envsubst '${WEBSERVER_HOST} ${PEERTUBE_HOST}' < $SOURCE_FILE > $TARGET_FILE | |
11 | ||
12 | while :; do | |
13 | sleep 12h & wait $!; | |
14 | nginx -s reload; | |
15 | done & | |
16 | ||
17 | nginx -g 'daemon off;' |