mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-03 19:32:57 +02:00
gitea: fix config file permissions
This commit is contained in:
parent
1407a8db28
commit
8c699e6f92
2 changed files with 11 additions and 19 deletions
|
@ -1,21 +1,13 @@
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
pre)
|
post)
|
||||||
if [ "$update" = "yes" ] ; then
|
if [ "$UPDATE" = "yes" ] ; then
|
||||||
touch tmp/gitea_permissions
|
:
|
||||||
chmod --reference=etc/gitea.conf tmp/gitea_permissions
|
else
|
||||||
chown --reference=etc/gitea.conf tmp/gitea_permissions
|
# 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
|
||||||
fi
|
fi
|
||||||
post)
|
chown _gitea:_gitea etc/gitea.conf
|
||||||
if [ "$UPDATE" = "yes" ] ; then
|
;;
|
||||||
chmod --reference=tmp/gitea_permissions etc/gitea.conf
|
|
||||||
chown --reference=tmp/gitea_permissions etc/gitea.conf
|
|
||||||
rm tmp/gitea_permissions
|
|
||||||
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
|
esac
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'gitea'
|
# Template file for 'gitea'
|
||||||
pkgname=gitea
|
pkgname=gitea
|
||||||
version=1.4.1
|
version=1.4.1
|
||||||
revision=2
|
revision=3
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path="code.gitea.io/gitea"
|
go_import_path="code.gitea.io/gitea"
|
||||||
# This could be done with build options, but these are built in with the
|
# This could be done with build options, but these are built in with the
|
||||||
|
|
Loading…
Add table
Reference in a new issue