diff --git a/files/__main__.py b/files/__main__.py index 90d754306..6ea2fa2d0 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -1,6 +1,6 @@ import gevent.monkey gevent.monkey.patch_all() -from os import environ +from os import environ, path import secrets from flask import * from flask_caching import Cache @@ -17,6 +17,10 @@ from sys import stdout import faulthandler from json import loads +f = 'files/templates/sidebar_' + environ.get("SITE_NAME").strip().lower() + '.html' +if not path.exists(f): + with open(f, 'w'): pass + app = Flask(__name__, template_folder='templates') app.url_map.strict_slashes = False app.jinja_env.cache = {} diff --git a/files/helpers/const.py b/files/helpers/const.py index 53ab67e58..19f13fcfd 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -564,5 +564,5 @@ FORTUNE_REPLIES = ('Your fortune: Allah Wills It',' no_pass_phrase = """

Sorry whiteboy, we're gonna need to see some ID before you start throwin that word around like it's nothing.\n\nTake a 10 minute time-out and come back when you've learned your lesson and/or paid reparations (by purchasing a BIPOC Approved™ Rdrama NWord Pass© from the shop) \n\nThis is an automated message; if you need help, you can message us here.

""" -if SITE == 'rdrama.net': subs = ('2balkan4u','2middleeast4u') +if SITE in ('rdrama.net','too4you.net'): subs = ('2balkan4you','2middleeast4you') else: subs = () \ No newline at end of file diff --git a/setup b/setup index 86f150c70..c46a772b0 100644 --- a/setup +++ b/setup @@ -1,9 +1,9 @@ -cd /drama +cd /Drama sudo apt update sudo apt -y upgrade sudo apt -y install postgresql postgresql-contrib sudo apt -y install redis-server -cp pg_hba.conf /etc/postgresql/13/main/pg_hba.conf +cp pg_hba.conf /etc/postgresql/12/main/pg_hba.conf sudo service postgresql restart sudo psql -U postgres -f schema.sql postgres sudo psql -U postgres -f seed-db.sql postgres @@ -15,4 +15,4 @@ mkdir /songs mkdir /images cp ./env.sh /env.sh . /env.sh -sudo -E gunicorn files.__main__:app -k gevent -w 2 --reload -b localhost:80 --max-requests 1000 --max-requests-jitter 500 +sudo -E gunicorn files.__main__:app -k gevent -w 2 --reload -b 0.0.0.0:80:80 --max-requests 1000 --max-requests-jitter 500 \ No newline at end of file