Skip to content

Commit

Permalink
Change way to get timeout, use custom.py settings
Browse files Browse the repository at this point in the history
  • Loading branch information
LePetitTim committed Nov 25, 2021
1 parent 99ddd59 commit d8d4662
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions conf/custom.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Custom settings
TIMEOUT = ${TIMEOUT}
2 changes: 1 addition & 1 deletion conf/env.in
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TIMEOUT="${TIMEOUT}"
TIMEOUT=${TIMEOUT}
1 change: 1 addition & 0 deletions debian/conffiles
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
opt/screamshotter/conf/custom.py.in
opt/screamshotter/conf/env.in
opt/screamshotter/conf/gunicorn-screamshotter.conf.py.in
1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
conf/custom.py.in opt/screamshotter/conf
conf/env.in opt/screamshotter/conf
conf/gunicorn-screamshotter.conf.py.in opt/screamshotter/conf
4 changes: 1 addition & 3 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ chown -R screamshotter:screamshotter /opt/screamshotter/static || true

# Generate config files
echo "Generate configuration" >&2
[ -f /opt/screamshotter/conf/custom.py ] || touch /opt/screamshotter/conf/custom.py
sed -i "s/TIMEOUT\s*=\s*[0-9]\+/TIMEOUT = "$TIMEOUT"/" /opt/screamshotter/conf/custom.py
CONF_DIR=/opt/screamshotter/conf
for f in env gunicorn-screamshotter.conf.py; do
for f in custom.py env gunicorn-screamshotter.conf.py; do
cat > $CONF_DIR/$f << END
# Generated by dpkg installation. DO NOT MODIFY MANUALLY.
Expand Down

0 comments on commit d8d4662

Please sign in to comment.