projects
/
apache2-cn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Modified debian/config - first time install and dpkg-reconfigure.
[apache2-cn.git]
/
debian
/
postinst
diff --git
a/debian/postinst
b/debian/postinst
index
d2a994f
..
335fabb
100755
(executable)
--- a/
debian/postinst
+++ b/
debian/postinst
@@
-478,8
+478,11
@@
fi
# Add VirtualHosts.
#
# 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
# Add WWW VirtualHost.
if [ -f "$CONFDIR/sites-available/$FQDN" ]; then
@@
-500,7
+503,7
@@
if [ "$RET" = "true" ]; then
install_vhost default www.$DOMAIN www.$DOMAIN
need_restart=1
fi
install_vhost default www.$DOMAIN www.$DOMAIN
need_restart=1
fi
-else
+ else
# No WWW VirtualHost.
if [ -f "$CONFDIR/sites-available/$FQDN" ]; then
# No WWW VirtualHost.
if [ -f "$CONFDIR/sites-available/$FQDN" ]; then
@@
-512,6
+515,7
@@
else
install_vhost -nvh -d -r $FQDN default $FQDN 000-$FQDN
need_restart=1
fi
install_vhost -nvh -d -r $FQDN default $FQDN 000-$FQDN
need_restart=1
fi
+ fi
fi
fi
@@
-555,9
+559,9
@@
if [ $apache2_sslcert -eq 0 ]; then
# SSLCertificateChainFile
if [ -n "$apache2_sslccf" ]; then
# 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
fi
cp_mv $SSLTMP ${CONFDIR}/sites-available/ssl