projects
/
apache2-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a2dissite nije radio ispravno na Debian lenny.
[apache2-cn.git]
/
debian
/
postinst
diff --git
a/debian/postinst
b/debian/postinst
index
5e654b7
..
41a96aa
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-131,7
+131,7
@@
generate_ssl () {
#
listen_ssl() {
#
listen_ssl() {
- if [ ! -f "$PORTCONF" ] || ! egrep -iq "^[[:space:]]*Listen[[:space:]]*.*443$" "$PORTCONF"; then
+ if [ ! -f "$PORTCONF" ] || ! egrep -iq "^[[:space:]]*Listen[[:space:]]+443$" "$PORTCONF"; then
cp_echo "CN: Enabling SSL port (443) for Apache2 web server."
cp_echo "CN: Enabling SSL port (443) for Apache2 web server."
@@
-449,7
+449,11
@@
if [ -z "$2" ]; then
chk_conf_tag "$CONFDIR/sites-available/$FQDN"
if [ ! -f "$CONFDIR/sites-available/$FQDN" ] || [ $RET -eq 0 ]; then
chk_conf_tag "$CONFDIR/sites-available/$FQDN"
if [ ! -f "$CONFDIR/sites-available/$FQDN" ] || [ $RET -eq 0 ]; then
- install_vhost -nvh -d -r www.$DOMAIN default $FQDN 000-$FQDN
+ if egrep -qi "^[[:space:]]*NameVirtualHost[[:space:]]+\*:80$" "$PORTCONF"; then
+ install_vhost -d -r www.$DOMAIN default $FQDN 000-$FQDN
+ else
+ install_vhost -nvh -d -r www.$DOMAIN default $FQDN 000-$FQDN
+ fi
need_restart=1
fi
need_restart=1
fi
@@
-467,7
+471,11
@@
if [ -z "$2" ]; then
chk_conf_tag "$CONFDIR/sites-available/$FQDN"
if [ ! -f "$CONFDIR/sites-available/$FQDN" ] || [ $RET -eq 0 ]; then
chk_conf_tag "$CONFDIR/sites-available/$FQDN"
if [ ! -f "$CONFDIR/sites-available/$FQDN" ] || [ $RET -eq 0 ]; then
- install_vhost -nvh -d -r $FQDN default $FQDN 000-$FQDN
+ if egrep -qi "^[[:space:]]*NameVirtualHost[[:space:]]+\*:80$" "$PORTCONF"; then
+ install_vhost -d -r $FQDN default $FQDN 000-$FQDN
+ else
+ install_vhost -nvh -d -r $FQDN default $FQDN 000-$FQDN
+ fi
need_restart=1
fi
fi
need_restart=1
fi
fi
@@
-485,7
+493,13
@@
if [ $apache2_sslcert -eq 0 ]; then
# No active SSL VirtualHosts found - add new one.
chk_conf_tag "$CONFDIR/sites-available/ssl"
if [ ! -f "$CONFDIR/sites-available/ssl" ] || [ $RET -eq 0 ]; then
# No active SSL VirtualHosts found - add new one.
chk_conf_tag "$CONFDIR/sites-available/ssl"
if [ ! -f "$CONFDIR/sites-available/ssl" ] || [ $RET -eq 0 ]; then
- install_vhost -r $FQDN -n $HOST ssl ssl 001-ssl
+
+ db_get apache2-cn/wwwhost || true
+ if [ "$RET" = "true" ]; then
+ install_vhost -r www.$DOMAIN -n $HOST ssl ssl 001-ssl
+ else
+ install_vhost -r $FQDN -n $HOST ssl ssl 001-ssl
+ fi
need_restart=1
fi
fi
need_restart=1
fi
fi