diff options
author | Simon Rettberg | 2017-03-30 10:58:36 +0200 |
---|---|---|
committer | Simon Rettberg | 2017-03-30 10:58:36 +0200 |
commit | 23564bfe7e69f593babab114e84f67854b8b8222 (patch) | |
tree | 95527b8340bfa8645aa13a7b3a546acb854444b2 | |
parent | [SSPS] We'll handle HSTS in PHP (diff) | |
download | setup-scripts-23564bfe7e69f593babab114e84f67854b8b8222.tar.gz setup-scripts-23564bfe7e69f593babab114e84f67854b8b8222.tar.xz setup-scripts-23564bfe7e69f593babab114e84f67854b8b8222.zip |
[SSPS] Add support for conf.d lighttpd directory
-rwxr-xr-x | satellit_installer/static_files/lighttpd-include-conf-d.sh | 16 | ||||
-rw-r--r-- | satellit_installer/static_files/lighttpd.conf | 4 |
2 files changed, 20 insertions, 0 deletions
diff --git a/satellit_installer/static_files/lighttpd-include-conf-d.sh b/satellit_installer/static_files/lighttpd-include-conf-d.sh new file mode 100755 index 0000000..a54ed3f --- /dev/null +++ b/satellit_installer/static_files/lighttpd-include-conf-d.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +if [ -n "$1" ]; then + DIR="$1" +else + DIR="/etc/lighttpd" +fi + +cd "$DIR" || exit 1 +[ -d "conf.d" ] || exit 0 + +for file in conf.d/*; do + [ -f "$file" ] && echo 'include "'"$DIR/$file"'"' +done +exit 0 + diff --git a/satellit_installer/static_files/lighttpd.conf b/satellit_installer/static_files/lighttpd.conf index e201741..991ee78 100644 --- a/satellit_installer/static_files/lighttpd.conf +++ b/satellit_installer/static_files/lighttpd.conf @@ -44,3 +44,7 @@ url.rewrite-once = ( "^/*vmchooser/+lecture/+([^/]+)/+([^/]+)(\?|$)" => "/slx-admin/api.php?do=dozmod&resource=$2&lecture=$1" ) +# Add support for a conf.d directory -- include /etc/lighttpd/conf.d/* +# Use this is you want to modify the satellite server, as future updates might overwrite lighttpd.conf +include_shell "/usr/share/lighttpd/include-conf-d.sh" + |