Skip to content

Commit

Permalink
pazpar2-apache2 updated for conf-enabled system
Browse files Browse the repository at this point in the history
  • Loading branch information
adamdickmeiss committed Oct 1, 2021
1 parent 32e7a17 commit 16b7344
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
22 changes: 14 additions & 8 deletions debian/pazpar2-apache2.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,26 @@ reload_apache()
if [ -e /etc/apache2/apache2.conf ]; then
if [ -d /etc/apache2/conf.d ]; then
ln -sf /etc/pazpar2/ap2pazpar2-js.cfg /etc/apache2/conf.d/pazpar2-js
fi

if [ ! -f /etc/apache2/mods-enabled/proxy_http.load ]; then
a2enmod proxy_http || true
fi

if [ -d /etc/apache2/conf.d ]; then
ln -sf /etc/pazpar2/ap2pazpar2.cfg /etc/apache2/conf.d/pazpar2

if [ -f /etc/apache2/conf.d/ap2pazpar2.cfg ]; then
rm /etc/apache2/conf.d/ap2pazpar2.cfg
fi
elif [ -d /etc/apache2/conf-available ]; then
if test ! -e /etc/apache2/conf-available/pazpar2-js.conf; then
ln -sf /etc/pazpar2/ap2pazpar2-js.cfg /etc/apache2/conf-available/pazpar2-js.conf
fi
a2enconf pazpar2-js.conf
if test ! -d /etc/apache2/conf-available/pazpar2.conf; then
ln -sf /etc/pazpar2/ap2pazpar2.cfg /etc/apache2/conf-available/pazpar2.conf
fi
a2enconf pazpar2.conf
fi


if [ ! -f /etc/apache2/mods-enabled/proxy_http.load ]; then
a2enmod proxy_http || true
fi

reload_apache
fi
exit 0
8 changes: 8 additions & 0 deletions debian/pazpar2-apache2.postrm
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ case "$1" in
invoke-rc.d $apache reload
fi
fi
if [ -f "/etc/$apache/conf-enabled/pazpar2.conf" ]; then
echo "Removing pazpar2 configuration file for $apache.."
a2disconf pazpar2.conf
fi
if [ -f "/etc/$apache/conf-enabled/pazpar2-js.conf" ]; then
echo "Removing pazpar2-js configuration file for $apache.."
a2disconf pazpar2-js.conf
fi
done
;;
upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
Expand Down

0 comments on commit 16b7344

Please sign in to comment.