Skip to content
Snippets Groups Projects
Commit d99337b8 authored by Christoph Berg's avatar Christoph Berg 📡
Browse files

cleanpg: Don't remove /etc/postgresql; don't automatically use sudo

parent 0204f9c1
No related branches found
No related tags found
No related merge requests found
Pipeline #21335 failed
......@@ -7,7 +7,7 @@ unstable:
- dpkg-buildpackage -uc -us -rfakeroot
- ( set -x; for deb in ../*.deb; do dpkg-deb --info $deb; dpkg-deb --contents $deb; done )
- ( set -x; dpkg --force-confmiss --force-confnew -i ../*.deb || { apt-get install -fy; dpkg --force-confmiss --force-confnew -i ../*.deb; } )
- ./cleanpg
- sudo ./cleanpg
- dpkg -l postgresql\* | cat
- pg_lsclusters
- SKIP_IPV6=1 ./testsuite -v "$(debian/supported-versions)" -i -M
......
......@@ -5,6 +5,7 @@
# packages.)
#
# (C) 2008-2009 Martin Pitt <mpitt@debian.org>
# (C) 2018 Christoph Berg <myon@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
......@@ -16,7 +17,8 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
[ `id -u` = 0 ] || SUDO=sudo
$SUDO /etc/init.d/postgresql stop
$SUDO killall pg_autovacuum postgres
$SUDO rm -rf /etc/postgresql /var/lib/postgresql/ /var/log/postgresql/* /tmp/postgresql-testsuite/ /var/run/postgresql/*
set -ux
/etc/init.d/postgresql stop
killall postgres
rm -rf /etc/postgresql/* /var/lib/postgresql/* /var/log/postgresql/* /tmp/postgresql-testsuite/ /var/run/postgresql/*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment