void-packages/srcpkgs/gitea/INSTALL

14 lines
416 B
Plaintext

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