apache2-cn (2.2-3) stable; urgency=low
- * TODO....
+ * Detekcija apache2-cn/sarge konfiguracije (rijeseno: #3160).
+ * Dodani debian/config i debian/templates - korisnik je upitan
+ za SSL certifikate i WWW VirtualHost, koristi se debconf.
+ * Podesavanje postavki (SSL i VirtualHost-ovi) odvija se samo
+ kod prve instalacije paketa ili u slucaju da se pokrene
+ dpkg-reconfigure.
+ * Stare AOSI postavke (/etc/apache2/conf.d/aosi-www.conf i
+ /etc/apache2/conf.d/aosi.conf) se brisu, u slucaju da postoje.
+ * Provjera dozvola za svaku generiranu konfiguracijsku datoteku
+ (file access permissions, chmod 644).
+ * Deaktivacija monit konfiguracije za Apache web server
+ (/etc/monit.d/apache1.conf), a zatim restart monit servisa.
+ * Ponekad se zna dogoditi da se Apache web server ne zaustavi
+ dovoljno brzo - u tom se slucaju Apache web server zaustavlja
+ na silu.
+ * Automatsko prepravljanje CustomLog i ErrorLog postavki - staza
+ /var/log/apache/ se postavlja u /var/log/apache2/.
-- Dragan Dosen <ddosen@ffzg.hr> Wed, 2 Apr 2008 12:37:00 +0200
# Load debconf
. /usr/share/debconf/confmodule
+if [ "$1" != reconfigure ]; then
+
+ apache2_done=1
+
+ db_fget apache2-cn/wwwhost seen
+ if [ "$RET" != "true" ]; then
+ apache2_done=0
+ fi
+
+ test $apache2_done -eq 1 && exit 0
+fi
+
+
CONFDIR="/etc/apache2"
CONF="$CONFDIR/apache2.conf"
HOST=$(hostname)
# Add VirtualHosts.
#
-db_get apache2-cn/wwwhost || true
-if [ "$RET" = "true" ]; then
+db_fget apache2-cn/wwwhost seen
+if [ "$RET" != "true" ]; then
+
+ db_get apache2-cn/wwwhost || true
+ if [ "$RET" = "true" ]; then
# Add WWW VirtualHost.
if [ -f "$CONFDIR/sites-available/$FQDN" ]; then
install_vhost default www.$DOMAIN www.$DOMAIN
need_restart=1
fi
-else
+ else
# No WWW VirtualHost.
if [ -f "$CONFDIR/sites-available/$FQDN" ]; then
install_vhost -nvh -d -r $FQDN default $FQDN 000-$FQDN
need_restart=1
fi
+ fi
fi
# SSLCertificateChainFile
if [ -n "$apache2_sslccf" ]; then
- cp_check_and_sed "^# SSLCertificateChainFile \/etc\/ssl\/certs/sureserverEDU\.pem" \
- "s#\# SSLCertificateChainFile /etc/ssl/certs/sureserverEDU.pem#SSLCertificateChainFile $apache2_sslccf #g" \
- $SSLTMP || true
+ cp_check_and_sed "^# SSLCertificateChainFile \/etc\/ssl\/certs/sureserverEDU\.pem" \
+ "s#\# SSLCertificateChainFile /etc/ssl/certs/sureserverEDU.pem#SSLCertificateChainFile $apache2_sslccf #g" \
+ $SSLTMP || true
fi
cp_mv $SSLTMP ${CONFDIR}/sites-available/ssl