diff options
Diffstat (limited to 'buildtools/debian-skeleton/rpki-ca.prerm')
-rw-r--r-- | buildtools/debian-skeleton/rpki-ca.prerm | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/buildtools/debian-skeleton/rpki-ca.prerm b/buildtools/debian-skeleton/rpki-ca.prerm index 5b83de2f..6992153a 100644 --- a/buildtools/debian-skeleton/rpki-ca.prerm +++ b/buildtools/debian-skeleton/rpki-ca.prerm @@ -26,6 +26,29 @@ case "$1" in rm -f /usr/share/rpki/pubd.key rm -f /usr/share/rpki/rpkid.cer rm -f /usr/share/rpki/rpkid.key + + rpki-sql-setup --mysql_defaults /etc/mysql/debian.cnf --script_purge >/etc/rpki/drop_databases.sql + + f=/etc/apache2/sites-available/default-ssl + awk < $f > ${f}.tmp ' + BEGIN { + conf_file = "/etc/rpki/apache.conf"; + conf_regexp = "^[ \t]*Include[ \t]+" conf_file "[ \t]*$"; + } + $0 !~ conf_regexp { + print; + }' + + if cmp -s ${f}.tmp ${f}.orig + then + mv -f ${f}.orig $f + rm -f ${f}.tmp + else + mv -f ${f}.tmp $f + fi + # At this point we've cleaned up our config mess. + # Not sure whether we should do "service apache2 reload" + # here, one could make a case either way. Skip for now. ;; upgrade|deconfigure) |