Enable CTS IPv6, forcefully remove sql scripts
This commit is contained in:
parent
929f1afd69
commit
da93d34c0d
4
cts.sh
4
cts.sh
@ -16,7 +16,7 @@ virtualenv --no-site-packages --python=/usr/bin/python2.7 /srv/cts
|
|||||||
export CTS_PWD=$(head -c 18 /dev/urandom | base64)
|
export CTS_PWD=$(head -c 18 /dev/urandom | base64)
|
||||||
envsubst <${SOURCE_DIR}/cts/tmp/cts-createdb.sql >/tmp/cts-createdb.sql
|
envsubst <${SOURCE_DIR}/cts/tmp/cts-createdb.sql >/tmp/cts-createdb.sql
|
||||||
sudo -u postgres psql -f /tmp/cts-createdb.sql
|
sudo -u postgres psql -f /tmp/cts-createdb.sql
|
||||||
rm /tmp/cts-createdb.sql
|
rm -f /tmp/cts-createdb.sql
|
||||||
|
|
||||||
# Configure CTS
|
# Configure CTS
|
||||||
export CTS_SECRET=$(head -c 26 /dev/urandom | base64)
|
export CTS_SECRET=$(head -c 26 /dev/urandom | base64)
|
||||||
@ -45,7 +45,7 @@ export CTS_ADMIN_HASH=$(cd /srv/cts && DJANGO_SETTINGS_MODULE=cts.settings.spott
|
|||||||
export CTS_ADMIN_SECRET=$(head -c 12 /dev/urandom | sha256sum | cut -c1-13)
|
export CTS_ADMIN_SECRET=$(head -c 12 /dev/urandom | sha256sum | cut -c1-13)
|
||||||
envsubst <${SOURCE_DIR}/cts/tmp/cts-adminpwd.sql >/tmp/cts-adminpwd.sql
|
envsubst <${SOURCE_DIR}/cts/tmp/cts-adminpwd.sql >/tmp/cts-adminpwd.sql
|
||||||
sudo -u postgres psql -f /tmp/cts-adminpwd.sql cts
|
sudo -u postgres psql -f /tmp/cts-adminpwd.sql cts
|
||||||
rm /tmp/cts-adminpwd.sql
|
rm -f /tmp/cts-adminpwd.sql
|
||||||
|
|
||||||
# Create CTS OS user
|
# Create CTS OS user
|
||||||
adduser --system --group --home /srv/cts --shell /bin/false cts
|
adduser --system --group --home /srv/cts --shell /bin/false cts
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 8004 ssl http2;
|
listen 8004 ssl http2;
|
||||||
|
listen [::]:8004 ssl http2;
|
||||||
|
|
||||||
root /srv/cts/cts;
|
root /srv/cts/cts;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user