mirror of
https://git.cloudron.io/cloudron/gitea-app.git
synced 2024-11-29 03:30:59 +00:00
Merge branch 'totp_fix' into 'master'
Preserve SECRET_KEY across restarts Closes #2 See merge request !5
This commit is contained in:
commit
c67b13585f
1 changed files with 5 additions and 0 deletions
5
start.sh
5
start.sh
|
@ -62,6 +62,11 @@ if ! [ -f /app/data/app.ini ]; then
|
||||||
cp /home/git/app.ini.template /app/data/app.ini
|
cp /home/git/app.ini.template /app/data/app.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$(crudini --get /app/data/app.ini security SECRET_KEY)" == "##SECRET_KEY" ]; then
|
||||||
|
echo "Generating new SECRET_KEY"
|
||||||
|
crudini --set "/app/data/app.ini" security SECRET_KEY $(pwgen -1 -s)
|
||||||
|
fi
|
||||||
|
|
||||||
# merge user config file
|
# merge user config file
|
||||||
crudini --merge "/run/gitea/app.ini" < "/app/data/app.ini"
|
crudini --merge "/run/gitea/app.ini" < "/app/data/app.ini"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue