void-packages/srcpkgs/gitea/INSTALL

14 lines
416 B
Text
Raw Normal View History

2017-10-17 07:19:03 +00:00
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