1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ihatemoney_ynh.git synced 2024-09-03 19:26:15 +02:00

Fix SECRET_KEY regeneration on upgrade

It was failing in case when the random key contained "/" char.
This commit is contained in:
Jocelyn Delalande 2018-04-03 00:32:08 +02:00
parent efc35dd01d
commit 6f8b6b7e57

View file

@ -91,7 +91,7 @@ then
# Clears all cookie-sessions, because py2 & py3 sessions are incompatible
# Relates https://github.com/lepture/flask-wtf/issues/279 (fix unreleased)
new_secret_key=`openssl rand -base64 32`
sudo sed -i "s/SECRET_KEY = \".*\"/SECRET_KEY = \"${new_secret_key}\"/g" /etc/ihatemoney/ihatemoney.cfg
sudo sed -i "s@SECRET_KEY = \".*\"@SECRET_KEY = \"${new_secret_key}\"@g" ${ihatemoney_conf_path}
fi