void-packages/srcpkgs/gitea/INSTALL
2017-10-25 00:14:09 -07:00

13 lines
416 B
Text

case "$ACTION" in
post)
if [ "$UPDATE" = "yes" ] ; then
:
else
# This sets the secret key which would otherwise be
# distributed as a static packaged value
secret="$(tr -dc '[:alnum:]' < /dev/urandom | head -c32)"
sed -i "s!<SECRET_KEY>!$secret!" etc/gitea.conf
chown _gitea:_gitea etc/gitea.conf
fi
;;
esac