X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=debian%2Fpazpar2.postinst;h=9588514c6d0885f77ea33c1258ffc71946cf6093;hb=64dccf5757a22cedd3c21ca834e3e02f39dd0504;hp=bf547419ffdf1e06b46dc6edd9403ac01bc090bf;hpb=f678fa0bf73f22a90344cfd9441e29a82d270b41;p=pazpar2-moved-to-github.git diff --git a/debian/pazpar2.postinst b/debian/pazpar2.postinst index bf54741..9588514 100644 --- a/debian/pazpar2.postinst +++ b/debian/pazpar2.postinst @@ -4,6 +4,23 @@ set -e if [ "$1" != "configure" ]; then exit 0 fi +for i in cf.xsl marc21.xsl pp2out-to-carrot2.xsl solr-pz2.xsl \ + dads-pz2.xsl marc22.xsl primo-pz2.xsl tmarc.xsl danmarc2.xsl \ + MarcXML2TurboMarc.xsl pz2-ourl-base.xsl unimarc.xsl dc.xsl \ + oai_dc.xsl pz2-ourl-marc21.xsl usmarc.xsl dkabm.xsl opac_turbomarc.xsl \ + pz2-solr.xsl marc21-ourl.xsl opac.xsl server-status-nagios.xsl ; do + dpkg-maintscript-helper rm_conffile /etc/pazpar2/$i 1.6.99.-1.indexdata -- "$@" +done + +# add default.xml if there are no enabled services +no_services=true +for f in /etc/pazpar2/services-enabled/*.xml; do + test -e $f && no_services=false +done +if ${no_services}; then + ln -sf ../services-available/default.xml \ + /etc/pazpar2/services-enabled/default.xml +fi if [ -x "/etc/init.d/pazpar2" ]; then update-rc.d pazpar2 defaults >/dev/null if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then @@ -11,7 +28,8 @@ if [ -x "/etc/init.d/pazpar2" ]; then else /etc/init.d/pazpar2 start || exit $? fi - ln -sf ../services-available/default.xml \ - /etc/pazpar2/services-enabled/default.xml +fi +if [ -f "/etc/pazpar2/pazpar2.cfg" ]; then + echo "pazpar2.cfg is obsolete. Pazpar2 uses /etc/pazpar2/server.xml" fi exit 0