use secret key file

This commit is contained in:
virusdefender
2018-05-05 15:21:53 +08:00
parent 3bb3becfcf
commit d5468803ba
3 changed files with 6 additions and 6 deletions

View File

@@ -3,10 +3,10 @@
APP=/app
DATA=/data
mkdir -p $DATA/log $DATA/ssl $DATA/test_case $DATA/public/upload $DATA/public/avatar $DATA/public/website
mkdir -p $DATA/log $DATA/config $DATA/ssl $DATA/test_case $DATA/public/upload $DATA/public/avatar $DATA/public/website
if [ ! -f "$APP/oj/custom_settings.py" ]; then
echo SECRET_KEY=\"$(cat /dev/urandom | head -1 | md5sum | head -c 32)\" >> $APP/oj/custom_settings.py
if [ ! -f "$DATA/config/secret.key" ]; then
echo $(cat /dev/urandom | head -1 | md5sum | head -c 32) > "$DATA/config/secret.key"
fi
if [ ! -f "$DATA/public/avatar/default.png" ]; then