diff --git a/packaging/debian/postinst b/packaging/debian/postinst index 9b79082efe..5ea1042b8b 100755 --- a/packaging/debian/postinst +++ b/packaging/debian/postinst @@ -41,11 +41,10 @@ case "$1" in ${CLI} config:set WEB_CONCURRENCY=${web_concurrency} # set SECRET_TOKEN env variable - secret_token=$(${CLI} config:get SECRET_TOKEN || ( < /dev/urandom tr -dc a-z0-9 | head -c128; echo )) + secret_token=$(${CLI} config:get SECRET_TOKEN || ${CLI} run rake -s secret | tail -1) ${CLI} config:set SECRET_TOKEN="$secret_token" # migrate - ADMIN_EMAIL=$(${CLI} config:get ADMIN_EMAIL || echo "admin@example.com") ${CLI} run rake ${rake_commands} || true sys_api_key=$(${CLI} config:get SYS_API_KEY)