diff options
Diffstat (limited to 'buildtools/debian-skeleton')
-rw-r--r-- | buildtools/debian-skeleton/rpki-ca.postinst | 2 | ||||
-rw-r--r-- | buildtools/debian-skeleton/rpki-ca.prerm | 35 |
2 files changed, 20 insertions, 17 deletions
diff --git a/buildtools/debian-skeleton/rpki-ca.postinst b/buildtools/debian-skeleton/rpki-ca.postinst index dd01d3f8..c94e052c 100644 --- a/buildtools/debian-skeleton/rpki-ca.postinst +++ b/buildtools/debian-skeleton/rpki-ca.postinst @@ -20,7 +20,7 @@ setup_rpkid_group() { } setup_apache() { - /usr/lib/rpki/rpkigui-apache-conf-gen --debian --install --verbose + /usr/lib/rpki/rpkigui-apache-conf-gen --install --verbose } setup_rpki_conf() { diff --git a/buildtools/debian-skeleton/rpki-ca.prerm b/buildtools/debian-skeleton/rpki-ca.prerm index b6033cf2..8b4d3945 100644 --- a/buildtools/debian-skeleton/rpki-ca.prerm +++ b/buildtools/debian-skeleton/rpki-ca.prerm @@ -49,24 +49,27 @@ case "$1" in # retain code needed to clean up nasty mess we created in the # past, to avoid breaking old installations on upgrade. - # Remove the old stuff first. + # Remove the old stuff first, if the containing file even exists. 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 + if test -r $f then - mv -f ${f}.orig $f - rm -f ${f}.tmp - else - mv -f ${f}.tmp $f + 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 fi # At this point we've cleaned up our Apache config mess. @@ -75,7 +78,7 @@ case "$1" in # Now remove the new stuff. - /usr/lib/rpki/rpkigui-apache-conf-gen --debian --remove --verbose + /usr/lib/rpki/rpkigui-apache-conf-gen --remove --verbose ;; |