fix(Gitea): use default TERM signal

The HUP signal may result into forking the process into the backgroud, so it breaks the daemon.
Restarting or reloading are failing as the port is still in use by the forked instance.
https://github.com/alpinelinux/aports/commit/8a8c116a951f8c8a53be667e4697a76c97db93dc
This commit is contained in:
EV21 committed 2022-09-07 21:04:08 +02:00
1 parent 0d205024da
commit 1438798d95
2 files changed
+27 -3

No files matched your search

+8
View File
@@ -12,7 +12,15 @@ GITHUB_API_URL=https://api.github.com/repos/$ORG/$REPO/releases/latest
function do_update_procedure
{
$GITEA_LOCATION manager flush-queues
gitea_pid=$(supervisorctl pid gitea)
echo "Process-ID is $gitea_pid"
supervisorctl stop gitea
if [[ $gitea_pid -gt 0 ]] && (ps --pid "$gitea_pid" > /dev/null)
then echo "still running! - killing it..."; kill "$gitea_pid"
fi
if (lsof -nP -iTCP:3000 -sTCP:LISTEN)
then echo "port 3000 is still in use, abbort"; exit 1
fi
wget --quiet --progress=bar:force --output-document "$TMP_LOCATION"/gitea "$DOWNLOAD_URL"
verify_file
mv --verbose "$TMP_LOCATION"/gitea "$GITEA_LOCATION"