Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| de28f71901 | |||
| c313318eb0 |
@@ -40,7 +40,8 @@ INTERNAL_TOKEN="$(gitea generate secret INTERNAL_TOKEN)"
|
||||
SECRET_KEY="$(gitea generate secret SECRET_KEY)"
|
||||
envsubst < %{_sysconfdir}/gitea/app.ini > %{_sysconfdir}/gitea/app.ini.new
|
||||
mv %{_sysconfdir}/gitea/app.ini.new %{_sysconfdir}/gitea/app.ini
|
||||
chmod 600 %{_sysconfdir}/gitea/app.ini
|
||||
chgrp gitea %{_sysconfdir}/gitea/app.ini
|
||||
chmod 640 %{_sysconfdir}/gitea/app.ini
|
||||
|
||||
# Create actrunners
|
||||
for i in $(seq 1 $GITEA_ACT_RUNNERS); do
|
||||
@@ -59,7 +60,7 @@ systemctl restart gitea.service
|
||||
|
||||
%preun
|
||||
# Backup gitea data in case of problem
|
||||
gitea dump --config %{_sysconfdir}/gitea/app.ini --tempdir %{_tmppath}
|
||||
runuser --user gitea -- gitea dump --config %{_sysconfdir}/gitea/app.ini --tempdir %{_tmppath}
|
||||
|
||||
%postun
|
||||
# Remove gitea user after uninstall
|
||||
@@ -81,5 +82,3 @@ fi
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user