Commit b76eb761 authored by Lucas Kanashiro's avatar Lucas Kanashiro

debian/obs-api.postrm: stop obsapi systemd services

parent 44c6a402
......@@ -22,8 +22,9 @@ open-build-service (2.9.4-3) UNRELEASED; urgency=medium
services.
* debian/README.Debian: add instructions on how to upgrade an exitent instance
* debian/rake-tasks.sh: stop all running processes from the old installation
* debian/obs-api.postrm: stop obsapi systemd services
-- Lucas Kanashiro <kanashiro@debian.org> Fri, 12 Apr 2019 14:55:15 -0300
-- Lucas Kanashiro <kanashiro@debian.org> Fri, 12 Apr 2019 15:56:45 -0300
open-build-service (2.9.4-2) unstable; urgency=medium
......
......@@ -37,6 +37,18 @@ reload_apache()
fi
}
stop_obsapi()
{
deb-systemd-invoke stop obsapi-clockwork.service >/dev/null || true
deb-systemd-invoke stop obsapi-delayedjob-queue-consistency_check.service >/dev/null || true
deb-systemd-invoke stop obsapi-delayedjob-queue-default.service >/dev/null || true
deb-systemd-invoke stop obsapi-delayedjob-queue-issuetracking.service >/dev/null || true
deb-systemd-invoke stop obsapi-delayedjob-queue-mailers.service >/dev/null || true
deb-systemd-invoke stop obsapi-delayedjob-queue-project_log_rotate.service >/dev/null || true
deb-systemd-invoke stop obsapi-delayedjob-queue-quick.service >/dev/null || true
deb-systemd-invoke stop obsapi-delayedjob-queue-releasetracking.service >/dev/null || true
}
if [ "$1" = "purge" ]; then
# ucf follows the symlink under /etc
#rm -f /etc/obs/api/config/database.yml
......@@ -72,6 +84,11 @@ if [ "$1" = "purge" ]; then
delgroup --system --quiet obsapi || true
# Restart Apache to really unload obs.conf
reload_apache restart
stop_obsapi
elif [ "$1" = "upgrade" ]; then
stop_obsapi
fi
#DEBHELPER#
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment