From c5643b04346bf7f3975a11e2e5a432fcb76f5f65 Mon Sep 17 00:00:00 2001 From: frisco <> Date: Fri, 28 Nov 2008 06:49:50 +0000 Subject: [PATCH] Started integrating apache2 DAV; not yet fully tested --- config/binary | 2 +- config/chroot_local-hooks/50cnas-config-chroot.sh | 11 +++++++++-- .../etc/apache2/conf.d/apache2_dav.conf | 13 +++++++++++++ 3 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 config/chroot_local-includes/etc/apache2/conf.d/apache2_dav.conf diff --git a/config/binary b/config/binary index c450ac1..470c498 100644 --- a/config/binary +++ b/config/binary @@ -121,7 +121,7 @@ LH_SYSLINUX_SPLASH="" # $LH_SYSLINUX_TIMEOUT: set custom syslinux timeout in seconds # (Default: 0) # "0" apparently means "wait forever" -LH_SYSLINUX_TIMEOUT="5" +LH_SYSLINUX_TIMEOUT="10" # $LH_SYSLINUX_CFG: set custom syslinux configuration file # (Default: empty) diff --git a/config/chroot_local-hooks/50cnas-config-chroot.sh b/config/chroot_local-hooks/50cnas-config-chroot.sh index be3c5b0..baf4540 100755 --- a/config/chroot_local-hooks/50cnas-config-chroot.sh +++ b/config/chroot_local-hooks/50cnas-config-chroot.sh @@ -79,10 +79,17 @@ function configure_normal() ############ webdav ############ #TODO: FIXME: configure port; add webdav link in web frontend + #this mkdir may be redundant with the DAV event script (TODO) + mkdir -p /var/cache/cryptobox-server/settings/misc/apache2_dav.conf.d sed -i 's/^NO_START=.*$/NO_START=0/' /etc/default/apache2 cp /usr/share/doc/cryptobox-server/event-scripts/apache2_dav /etc/cryptobox-server/events.d/apache2_dav chmod +x /etc/cryptobox-server/events.d/apache2_dav + # CryptoNAS's apache2_dav.conf should already be in /etc/apache2/conf.d + # in SVN. + #Tell apache2 NOT to listen on non-DAV ports + echo "#Leave 80 and 443 open for CryptoNAS's use" > /etc/apache2/ports.conf + echo "Listen 8080" >> /etc/apache2/ports.conf ########### boot up ########### # turn off creation of "/etc/nologin" (read-only fs) @@ -92,8 +99,8 @@ function configure_normal() ######### shutdown ######### # Remove the prompt to eject CD - rm -r /etc/rc0.d/*casper - rm -r /etc/rc6.d/*casper + rm -f /etc/rc0.d/*casper + rm -f /etc/rc6.d/*casper ######### devices ########## # create tun device for running under qemu diff --git a/config/chroot_local-includes/etc/apache2/conf.d/apache2_dav.conf b/config/chroot_local-includes/etc/apache2/conf.d/apache2_dav.conf new file mode 100644 index 0000000..e1572ef --- /dev/null +++ b/config/chroot_local-includes/etc/apache2/conf.d/apache2_dav.conf @@ -0,0 +1,13 @@ +# this file is part of the CryptoBox +# put it into /etc/apache2/conf.d/ +# you MUST create the directory given below - otherwise apache will not like it :( +# do not forget to chown the directory to the cryptobox user + + + # include the dynamically managed configuration directory - IT MUST EXIST + Include /var/cache/cryptobox-server/settings/misc/apache2_dav.conf.d/ + # lock database - should be writeable for www-data + DavLockDB /tmp/dav_lock.db + # a longer value than the default (120) help for high-latency networks + DavMinTimeout 600 +