Attempt to fix the 'unable to write random state' issue ... need an actual debian build to test :s

This commit is contained in:
Alexandre Aubin 2019-05-16 16:21:14 +02:00 committed by GitHub
parent 135aba64a7
commit aa65dac3d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

3
debian/postinst vendored
View file

@ -14,7 +14,8 @@ do_configure() {
# Replace RANDOMID with a random hash to invalidate
# old cache ... we generate this locally on each machine
# to avoid leaking stuff like the version
RANDOMID=$(openssl rand -hex 4)
# https://stackoverflow.com/questions/94445/using-openssl-what-does-unable-to-write-random-state-mean
RANDOMID=$(RANDFILE=.rnd openssl rand -hex 4)
sed -i "s/RANDOMID/$RANDOMID/g" /usr/share/yunohost/admin/index.html
}