diff options
author | Rob Austein <sra@hactrn.net> | 2016-02-15 07:51:40 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2016-02-15 07:51:40 +0000 |
commit | def95e42fda9a9e45bdf4f40a6ecb93b644dbf0b (patch) | |
tree | 1505c5859484053e8a120acaef60869389d3d901 /buildtools/debian-skeleton/rpki-rp.prerm | |
parent | 21527a93bf51875473bc29698189e9e9540aee1b (diff) |
Checkpoint while shuffling stuff around for new installation scheme.
Installation of everything but Debian packages is probably broken, and
Debian packages are too at the moment due to (probably) minor errors
in buildtools/debian-skeleton, but enough has changed that this really
needs a snapshot checked in for backup.
svn path=/branches/tk705/; revision=6257
Diffstat (limited to 'buildtools/debian-skeleton/rpki-rp.prerm')
-rw-r--r-- | buildtools/debian-skeleton/rpki-rp.prerm | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/buildtools/debian-skeleton/rpki-rp.prerm b/buildtools/debian-skeleton/rpki-rp.prerm index 37b111f2..b7e7cbde 100644 --- a/buildtools/debian-skeleton/rpki-rp.prerm +++ b/buildtools/debian-skeleton/rpki-rp.prerm @@ -20,16 +20,25 @@ set -e case "$1" in remove) - crontab -l -u rcynic 2>/dev/null | awk ' + # Record what will be needed to drop the databases completely, + # while we still have the necessary configuration data, but + # postpone dropping the databases until the postrm script, + # since that's where we find out whether this is a purge. + + rpki-sql-setup --debug --verbose --postgresql-root-username postgres script-drop /etc/rpki/drop_databases.sql + + # Clean up our cron job. + + crontab -l -u rpki 2>/dev/null | awk ' $0 !~ "exec /usr/bin/rcynic-cron" { line[++n] = $0; } END { if (n) for (i = 1; i <= n; i++) - print line[i] | "crontab -u rcynic -"; + print line[i] | "crontab -u rpki -"; else - system("crontab -u rcynic -r"); + system("crontab -u rpki -r"); }' ;; |